private BufferedImage createImage ( final int WIDTH , final int HEIGHT , final int TRANSPARENCY ) { final GraphicsConfiguration GFX_CONF = GraphicsEnvironment . getLocalGraphicsEnvironment ( ) . getDefaultScreenDevice ( ) . getDefaultConfiguration ( ) ; if ( WIDTH <= 0 || HEIGHT <= 0 ) { return GFX_CONF . createCompatibleImage ( 1 , 1 , TRANSPARENCY ) ; } final BufferedImage IMAGE = GFX_CONF . createCompatibleImage ( WIDTH , HEIGHT , TRANSPARENCY ) ; return IMAGE ; }
Returns a compatible image of the given size and transparency