question: public void paint ( Graphics g ) { g = g . create ( ) ; setRenderingHints ( g ) ; setCompositeOnGraphics ( ( Graphics2D ) g ) ; super . paint ( g ) ; }
target:  If you are going to change the Graphics object in this method, you should make a copy of it first using the Graphics.create() method so the changes won't affect other layers.