posted 13 years ago
Hi
I have a class Pixel(x, y, filled) which holds the properties of a single pixel in a BufferedImage. x and y are simply the coordinates, and 'filled' is a boolean that specifies whether the pixel is filled or not (its really long to explain the whole thing, so this is just to give you an idea of what's going on)
Now I want to create a 2d array the size of my BufferedImage (Pixel[][] pixelArray = new Pixel[width][height]), holding a new Pixel object in each cell with its own properties. Is it possible to use the following for-loop for this matter? Or do I have to change the name of the Pixel object every time?
Thanks in advance