Hey
I have to draw a dotted or dashed line In a JComponent. How do I do that?
Hey
I have to draw a dotted or dashed line In a JComponent. How do I do that?
Get a hold of a Graphics2D
, and use its setStroke()
method to set a suitable stroke. It should be enough with a BasicStroke
to get a dotted line, nothing fancy.