Dashed line suddenly became solid line!

Hi,

Can anyone help me with a problem that I'm facing now?

I managed to draw a dashed line between two rotating objects. However, I noticed that at certain rotating angle, the dashed line become a solid line!

Below is my code:

Graphics2D g2d = (Graphics2D)g;

Line2D line = new Line2D.Double(x1, y1, x2, y2);

float[] dashPattern = {8,18};

g2d.setStroke(new BasicStroke(1.0F, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.0F, dashPattern, 0));

g2d.draw(line);

Thank you.

[534 byte] By [Vitamina] at [2007-9-25]