Sometimes you might want to create an image from pixel information.

Java does not provide any way to plot pixels directly onto drawing surfaces. You have to create an image everytime!

The source code to this example is: