This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes java2D drawline artifacts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "java2D drawline artifacts" Watch "java2D drawline artifacts" New topic

java2D drawline artifacts

sophyan julio

Joined: Sep 16, 2005
Posts: 5
I have a function that captues mouse input which then draws a size 20 pixel line. But using BasicStroke stroke = new BasicStroke(30,0,2); I get jagged lines within my drawn line, when I do a Drawline(). Is there a way to eliminate these artifacts?

I have already tried
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

but it does not improve the drawline function.

[ September 20, 2005: Message edited by: sophyan julio ]
jQuery in Action, 2nd edition
subject: java2D drawline artifacts
Similar Threads
[ ClassDiagram ] How to represent defaults
Lemon Pound Cake with Lemon Curd
photo sharing site
[images] see what I got during the flight
PA #1.....picture association