Here you can find the source of initGlobalFontSetting()
public static void initGlobalFontSetting()
//package com.java2s; //License from project: Open Source License import java.awt.Font; import java.util.Enumeration; import javax.swing.UIManager; import javax.swing.plaf.FontUIResource; public class Main { public static void initGlobalFontSetting(Font font) { FontUIResource fontRes = new javax.swing.plaf.FontUIResource(font); Enumeration<Object> keys = UIManager.getDefaults().keys(); while (keys.hasMoreElements()) { Object key = keys.nextElement(); Object value = UIManager.get(key); if (value instanceof javax.swing.plaf.FontUIResource) UIManager.put(key, fontRes); }//from w w w . ja v a 2s . c o m } public static void initGlobalFontSetting() { Font font = new Font("SansSerif", Font.TRUETYPE_FONT, 12); FontUIResource fontRes = new javax.swing.plaf.FontUIResource(font); Enumeration<Object> keys = UIManager.getDefaults().keys(); while (keys.hasMoreElements()) { Object key = keys.nextElement(); Object value = UIManager.get(key); if (value instanceof javax.swing.plaf.FontUIResource) UIManager.put(key, fontRes); } } }