Java tutorial
//package com.java2s; import java.awt.Font; import javax.swing.UIManager; public class Main { /** * Returns an instance of a mono-spaced font (like Courier) with the default font size. */ public static Font getUIFontMonoSpaced() { return new Font("Monospaced", 0, getUIFont().getSize()); } /** * Returns the default "Label.font" as used by Swing's UIManager. */ public static Font getUIFont() { return (Font) UIManager.get("Label.font"); // and NOT: return (Font)UIManager.getLookAndFeelDefaults().get("Label.font"); } }