title: how to make JTextPane paint anti-aliased font?
body: <p>in the a swing app i'm rendering text with a custom <code>JComponent</code>, using <code>Graphics.drawString()</code>. here is a sample:<br>
  <a href="http://img525.imageshack.us/img525/4928/drawstringsample.jpg" rel="nofollow noreferrer">aa text http://img525.imageshack.us/img525/4928/drawstringsample.jpg</a><br>
  in that same app, i'm rendering text using a <code>JTextPane</code>. here is a sample:<br>
  <a href="http://img28.imageshack.us/img28/1134/jtextpanesample.jpg" rel="nofollow noreferrer">alt text http://img28.imageshack.us/img28/1134/jtextpanesample.jpg</a>  </p>
  
  <p>can you notice how the lower sample is a little 'smudged'? well, i can't figure out how to make it look like the upper sample.</p>
  
  <p>thanks, asaf :-)</p>
  
  <hr>
  
  <p>update:</p>
  
  <ul>
  <li><code>System.setProperty("awt.useSystemAAFontSettings","false")</code> and <code>"lcd"</code> too aren't working.</li>
  <li><code>((Graphics2D)g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_OFF)</code> in <code>paint()</code> isn't working</li>
  <li><code>putClientProperty(</code><b><code>sun.swing.SwingUtilities2</code></b><code>.AA_TEXT_PROPERTY_KEY, Boolean.TRUE)</code> gives <code>java.lang.ClassCastException: java.lang.Boolean cannot be cast to sun.swing.SwingUtilities2$AATextInfo</code></li>
  </ul>