Three By Three Images Applet: You will recreate this applet. Each dot you see in the applet area is a three by three image. Which means that each image contains a total of nine pixels. |
In this example each pixel in each image is set individually. Here are the basic steps you must follow for each image.
Step One: Declare an instance of the Image class like this:
Image one;
int pixel[] = new int[9];
pixel[0]=red; pixel[1]=red; pixel[2]=red; pixel[3]=red; pixel[4]=red; pixel[5]=red; pixel[6]=red; pixel[7]=red; pixel[8]=red;
one = createImage(new MemoryImageSource(3,3,pixel,0,3));