File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Text Anti-aliasing" Watch "Text Anti-aliasing" New topic

Text Anti-aliasing

Isaac Hewitt
Ranch Hand

Joined: Jul 24, 2006
Posts: 191

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

Joined: Sep 20, 2010
Posts: 4629

System.setProperty("swing.aatext", "true");

Add these lines at the start of your program, before anything is displayed.

The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
I agree. Here's the link:
subject: Text Anti-aliasing
It's not a secret anymore!