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