use BufferedImage instead of paint fill rect every pixel.