Java Swing UIManager setDefaultSize(int size)

Here you can find the source of setDefaultSize(int size)

Description

set Default Size

License

Open Source License

Declaration

public static void setDefaultSize(int size) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.Font;

import java.util.Set;

import javax.swing.UIManager;

public class Main {
    public static void setDefaultSize(int size) {
        Set<Object> keySet = UIManager.getLookAndFeelDefaults().keySet();
        Object[] keys = keySet.toArray(new Object[keySet.size()]);

        for (Object key : keys) {
            if (key != null && key.toString().toLowerCase().contains("font")) {
                System.out.println(key);
                Font font = UIManager.getDefaults().getFont(key);
                if (font != null) {
                    font = font.deriveFont((float) size);
                    UIManager.put(key, font);
                }//w  w  w . j a  v a2s  . c o  m
            }
        }
    }
}

Related

  1. prepareTheme(final String overrideEnvVar)
  2. printDefaults()
  3. printUIDefaults()
  4. setComponentLF(JComponent comp, String ui)
  5. setCrossPlatformProperties()
  6. setEnabled(Component component, boolean enabled, boolean recursively)
  7. setNative()
  8. SetNetBeansCompatibleUIManager()
  9. setNimbusLF()