Here you can find the source of resetUIFont(String name, int style, int size)
Parameter | Description |
---|---|
name | a parameter |
style | a parameter |
size | a parameter |
public final static void resetUIFont(String name, int style, 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 { /**//from w w w. ja v a 2s.co m * UIFonts reset * * @param name * @param style * @param size */ public final static void resetUIFont(String name, int style, 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 f = new FontUIResource(name, style, size); UIManager.put(key, f); } } } }