Here you can find the source of setUIFont(FontUIResource f)
public static void setUIFont(FontUIResource f)
//package com.java2s; import java.util.Enumeration; import javax.swing.UIManager; import javax.swing.plaf.FontUIResource; public class Main { public static void setUIFont(FontUIResource f) { Enumeration<Object> keys = UIManager.getDefaults().keys(); while (keys.hasMoreElements()) { Object key = keys.nextElement(); Object value = UIManager.get(key); if (value != null && value instanceof FontUIResource) UIManager.put(key, f); }//from www .j a v a 2 s . c o m } }