src/main/java/org/jfree/graphics2d/svg/SVGGraphicsConfiguration.java
@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);
    }
@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.

@param width  the image width.
@param height  the image height.
@param caps  the image capabilities.
@param transparency  the transparency.

@return The volatile image.

@throws AWTException if there is a problem creating the image.