Here you can find the source of resetUIFontSize(int size)
Parameter | Description |
---|---|
size | a parameter |
public final static void resetUIFontSize(int size)
//package com.java2s; //License from project: Apache License import java.util.Map; import javax.swing.UIManager; import javax.swing.plaf.FontUIResource; public class Main { /**/* w w w . j av a 2 s . co m*/ * reset ui font size * * @param size */ public final static void resetUIFontSize(int size) { for (Map.Entry<Object, Object> entry : UIManager.getDefaults().entrySet()) { Object key = entry.getKey(); Object value = UIManager.get(key); if (value != null && value instanceof FontUIResource) { FontUIResource fr = (FontUIResource) value; FontUIResource f = new FontUIResource(fr.getFamily(), fr.getStyle(), size); UIManager.put(key, f); } } } }