title: How to do Font Smoothing for AWT/Swing Application?
body: <p>I need to do font smoothing for a AWT application on Windows System.
  On doing googling I came to know that I can set following VM argument in Eclipse.</p>
  
  <pre><code>-Dawt.useSystemAAFontSettings=gasp
  </code></pre>
  
  <p>But this is not yielding any positive results.
  If anyone is having a better idea on how to achieve Font Smoothing, then kindly let me know.</p>
  
  <p><strong>EDIT</strong> After Answer By Andrew</p>
  
  <p>I added the following snippet of code in paint method</p>
  
  <pre><code>public class BottomSubmitButtons extends Canvas {
  
  @Override
  public void paint(Graphics g) {
  
      Graphics2D g2 = (Graphics2D)g;
      RenderingHints rh = new RenderingHints(
              RenderingHints.KEY_TEXT_ANTIALIASING,
              RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);
      g2.setRenderingHints(rh);
  }
  }
  </code></pre>
  
  <p>This seems to have improved the smoothing in one of the sub panel.
  But doing the same in other panel is not yielding any smoothing. Also the TextField boxes are going invisible by default, though they becomes visible once I click in that area</p>