question: private void paintDirectly ( Graphics2D g , JComponent c , int w , int h , Object [ ] extendedCacheKeys ) { g = ( Graphics2D ) g . create ( ) ; configureGraphics ( g ) ; doPaint ( g , c , w , h , extendedCacheKeys ) ; g . dispose ( ) ; }
target:  Convenience method which creates a temporary graphics object by creating a clone of the passed in one, configuring it, drawing with it, disposing it. These steps have to be taken to ensure that any hints set on the graphics are removed subsequent to painting.