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