File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


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 a good circle!" Watch "drawing a good circle!" New topic
Author

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.
 
jQuery in Action, 2nd edition
 
subject: drawing a good circle!