Java Swing Font Set setUIFont(javax.swing.plaf.FontUIResource f)

Here you can find the source of setUIFont(javax.swing.plaf.FontUIResource f)

Description

set UI Font

License

Apache License

Declaration

public static void setUIFont(javax.swing.plaf.FontUIResource f) 

Method Source Code


//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
    }
}

Related

  1. setUIFont(FontUIResource f)
  2. setUIFont(FontUIResource f)
  3. setUIFont(FontUIResource f)
  4. setUIFont(javax.swing.plaf.FontUIResource f)
  5. setUIFont(javax.swing.plaf.FontUIResource f)
  6. setUIFont(javax.swing.plaf.FontUIResource f)
  7. setUIFont(javax.swing.plaf.FontUIResource font)
  8. setUIFont(String font)
  9. setUIFontStyle(final int fontStyle)