Java Swing Font Set setUIFont(FontUIResource f)

Here you can find the source of setUIFont(FontUIResource f)

Description

set UI Font

License

Open Source License

Declaration

public static void setUIFont(FontUIResource f) 

Method Source Code


//package com.java2s;

import java.util.Enumeration;

import javax.swing.UIManager;

import javax.swing.plaf.FontUIResource;

public class Main {
    public static void setUIFont(FontUIResource f) {
        Enumeration<Object> keys = UIManager.getDefaults().keys();
        while (keys.hasMoreElements()) {
            Object key = keys.nextElement();
            Object value = UIManager.get(key);

            if (value != null && value instanceof FontUIResource)
                UIManager.put(key, f);
        }//from   www  .j a v  a 2  s .  c o m
    }
}

Related

  1. setUIDefaultFont()
  2. setUIFont(final Font font)
  3. setUIFont(final Font font)
  4. setUIFont(Font f)
  5. setUIFont(Font fon)
  6. setUIFont(FontUIResource f)
  7. setUIFont(FontUIResource f)
  8. setUIFont(FontUIResource f)
  9. setUIFont(FontUIResource f)