stroke = new BasicStroke( 0.2f*ds,//width BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL);//don't care g2.setStroke(stroke); g2.setPaint(Color.green); g2.draw(new Line2D.Double( -1.5*ds,-1.0*ds,-0.5*ds,-1.0*ds)); Figure 4