aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Drawing dotted/dashed lines in a scaled JPanel? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Drawing dotted/dashed lines in a scaled JPanel?" Watch "Drawing dotted/dashed lines in a scaled JPanel?" New topic
Author

Drawing dotted/dashed lines in a scaled JPanel?

Walter Sheets
Greenhorn

Joined: Jan 23, 2009
Posts: 8
It's not that I can't draw dotted lines, I can, but when I use Graphics2D.scale() to zoom in or out on the JPanel the dotted lines become ugly/rough/fuzzy depending on the scale factor.

I want the dotted lines to scale correctly in terms of location, but not change the appearance or spacing of the dottedness. Is there a way to do this?

Many thanks.



 
jQuery in Action, 2nd edition
 
subject: Drawing dotted/dashed lines in a scaled JPanel?