public void dispose() {
		for (int layer = 0; layer < 4; layer++) {
			Graphics2D graphics = layeredGraphics[layer];
			if (graphics != null) {
				graphics.dispose();
				layeredGraphics[layer] = null;
			}
			BufferedImage image = layeredImage[layer];
			if (image != null) {
				image.flush();
				layeredImage[layer] = null;
			}
		}
	}
public void dispose ( ) { for ( int layer = 0 ; layer < 4 ; layer ++ ) { Graphics2D graphics = layeredGraphics [ layer ] ; if ( graphics != null ) { graphics . dispose ( ) ; layeredGraphics [ layer ] = null ; } BufferedImage image = layeredImage [ layer ] ; if ( image != null ) { image . flush ( ) ; layeredImage [ layer ] = null ; } } }
Dispose of the layered graphics and images