code: public Graphics getBufferedGraphics() {
          Dimension dim = getSize();
          imageBuffer = createImage( dim.width, dim.height );
          if ( null == imageBuffer )
              throw new IllegalComponentStateException("Cannot create Image");
          return imageBuffer.getGraphics();
      }
docs: Get a buffered (persistent) image for drawing on this component