Here you can find the source of initGlobalFont(Font font)
public static void initGlobalFont(Font font)
//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 initGlobalFont(Font font) { FontUIResource fontRes = new FontUIResource(font); for (Enumeration<Object> keys = UIManager.getDefaults().keys(); keys.hasMoreElements();) { Object key = keys.nextElement(); Object value = UIManager.get(key); if (value instanceof FontUIResource) { UIManager.put(key, fontRes); }//from w ww . ja v a2 s.c o m } } }