@ Override public VolatileImage createCompatibleVolatileImage ( int width , int height , ImageCapabilities caps , int transparency ) throws AWTException { if ( img == null ) { img = new BufferedImage ( 1 , 1 , BufferedImage . TYPE_INT_ARGB ) ; gc = img . createGraphics ( ) . getDeviceConfiguration ( ) ; } return gc . createCompatibleVolatileImage ( width , height , caps , transparency ) ; }
Returns a volatile image . This method is a workaround for a ClassCastException that occurs on MacOSX when exporting a Swing UI that uses the Nimbus Look and Feel to SVG .