stroke = new BasicStroke(
               0.2f*ds,//width
               BasicStroke.CAP_BUTT,
               BasicStroke.JOIN_ROUND,
               0.0f,//miterlimit doesn't matter
               //Dash Pattern 
               new float[] {0.1f*ds,0.3f*ds},
               0.0f);//Dash phase
     g2.setStroke(stroke);
     
     GeneralPath gp6 = new GeneralPath();
     gp6.moveTo(1.25f*ds,1.25f*ds);
     gp6.lineTo(1.50f*ds,0.25f*ds);
     gp6.lineTo(1.75f*ds,1.25f*ds);
     
     g2.setPaint(Color.red);
     g2.draw(gp6);

Figure 14