import javax.swing.*; 
import java.awt.*; 
import java.util.Map; 

public class AntialiasingFontCheck implements Runnable { 
    private JFrame frame; 
    private JMenuBar menuBar; 

    public static void main(String[] args) { 
        SwingUtilities.invokeLater(new AntialiasingFontCheck()); 
    } 

    public void run() { 
        Toolkit tk = Toolkit.getDefaultToolkit(); 
        Map map = (Map) tk.getDesktopProperty("awt.font.desktophints"); 
        final Object antialiasingHint = map.get(RenderingHints.KEY_TEXT_ANTIALIASING); 
        final String hint = RenderingHints.KEY_TEXT_ANTIALIASING + " : " + antialiasingHint; 
        System.out.println(hint); 

        frame = new JFrame(); 
        menuBar = new JMenuBar(); 

        JMenu fileMenu = new JMenu("File"); 
        fileMenu.setMnemonic('f'); 
        menuBar.add(fileMenu); 
        frame.setJMenuBar(menuBar); 
        final JTextArea textArea = new JTextArea(); 
        textArea.setText(hint); 
        frame.getContentPane().add(textArea); 

        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
        frame.setPreferredSize(new Dimension(400, 300)); 
        frame.pack(); 
        frame.setLocationRelativeTo(null); 
        frame.setVisible(true); 
    } 
} 