This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Text Anti-aliasing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Text Anti-aliasing" Watch "Text Anti-aliasing" New topic
Author

Text Anti-aliasing

Isaac Hewitt
Ranch Hand

Joined: Jul 24, 2006
Posts: 190

I am using Java 6 update 22, on duo processor Windows 7. I have researched how to render all text in my program anti-aliased and have found all sorts of things on the Internet. I want to be able to have smooth text for every component without having to subclass them and adding



I have tried -Dswing.aatext=true in the NetBeans project properties box, but the text in the JLabel still looks jagged.
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3599
    
  14

System.setProperty("awt.useSystemAAFontSettings","on");
System.setProperty("swing.aatext", "true");

Add these lines at the start of your program, before anything is displayed.
 
 
subject: Text Anti-aliasing
 
Similar Threads
Pattern V/s Anti-Pattern
spyware, virus.. related
shame on you all
Antialiasing Text
Java API for 3rd party anti virus tool integration