void (final Graphics g) { final int handleHeight=getHandleHeight(); final int handleWidth=getHandleWidth(); // Paint top handle final int x=(getWidth()-handleWidth)/2; drawHandle(g,x,0); g.setColor(ourColor1); LinePainter2D.paint((Graphics2D)g, x + handleWidth / 2, handleHeight, x + handleWidth / 2, handleHeight + 1); // Paint bottom handle final int y=getHeight()-handleHeight-1; drawHandle(g,x,y); LinePainter2D.paint((Graphics2D)g, x + handleWidth / 2, y - 2, x + handleWidth / 2, y); g.setColor(ourColor1); // Draw spring drawSpring(g,x+handleWidth/2,handleHeight+1,getHeight()-2*handleHeight-4); }