Two Laptop Bag
The moose likes Swing / AWT / SWT and the fly likes drawing a good circle! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "drawing a good circle!" Watch "drawing a good circle!" New topic

drawing a good circle!

Chris Dancy
Ranch Hand

Joined: Feb 14, 2006
Posts: 136
So yes drawing a circle is a rather painless problem. However, when I draw my circle there is still a bit of aliasing going on and it irritates me and does not look good. Here is my code, its the paintComponent method followed by the paintBorder method...

and paintBorder...

you may notice that im using drawRoundRect instead of drawOval, you get the same effect either way, I simply have it this way because at one point I had rectangle buttons and then I decided upon circular buttons. So if anyone has any ideas on how to get a better drawn circle I would love to hear it.

("Anger is not an emotion, its a symptom of fear.")
Suraj Chandran
Ranch Hand

Joined: May 20, 2008
Posts: 53

I guess there are couple of design issues in this classic software the GOD coded.
I agree. Here's the link:
subject: drawing a good circle!
jQuery in Action, 3rd edition