Java tutorial
//package com.java2s; import java.util.Enumeration; import javax.swing.UIManager; import javax.swing.plaf.FontUIResource; public class Main { public static void setFontSize(int size) { for (Enumeration keys = UIManager.getDefaults().keys(); keys.hasMoreElements();) { Object key = keys.nextElement(); Object value = UIManager.get(key); if (value instanceof FontUIResource) { UIManager.put(key, ((FontUIResource) value).deriveFont((float) size)); } } } }