Tuesday, June 12, 2001 06:09 PM
Keep the image of your screen in an
offscreen image (i.e. one you created with Component.createImage). Then use java.awt.image.PixelGrabber to obtain a pixel array corresponding with the pixels of your image.
You can implement getPixel by examining the array the PixelGrabber made.
You an implement floodfill in the pixel array. Then you need to turn the pixel array back into an image - use java.awt.image.MemoryImageSource to do this.