Stroke stroke = new BasicStroke( 0.2f*ds,//width BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL);//don't care g2.setStroke(stroke); Figure 2