Here you can find the source of setUIFontSize(float size)
public static void setUIFontSize(float size)
//package com.java2s; //License from project: Open Source License import java.awt.Font; import javax.swing.UIManager; public class Main { public static void setUIFontSize(float size) { java.util.Enumeration keys = UIManager.getDefaults().keys(); while (keys.hasMoreElements()) { Object key = keys.nextElement(); Object value = UIManager.get(key); if (value instanceof javax.swing.plaf.FontUIResource) { Font font = UIManager.getFont(key); if (font != null) { UIManager.put(key, new javax.swing.plaf.FontUIResource( font.deriveFont(size))); }//ww w. jav a 2 s. co m } } } }