Java Swing Font Set setSwingFont(Font font)

Here you can find the source of setSwingFont(Font font)

Description

set Swing Font

License

Open Source License

Declaration

public static void setSwingFont(Font font) 

Method Source Code

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

import java.awt.Font;

import javax.swing.UIManager;

public class Main {
    public static void setSwingFont(Font font) {
        UIManager.put("Button.font", font);
        UIManager.put("ToggleButton.font", font);
        UIManager.put("RadioButton.font", font);
        UIManager.put("CheckBox.font", font);
        UIManager.put("ColorChooser.font", font);
        UIManager.put("ToggleButton.font", font);
        UIManager.put("ComboBox.font", font);
        UIManager.put("ComboBoxItem.font", font);
        UIManager.put("InternalFrame.titleFont", font);
        UIManager.put("Label.font", font);
        UIManager.put("List.font", font);
        UIManager.put("MenuBar.font", font);
        UIManager.put("Menu.font", font);
        UIManager.put("MenuItem.font", font);
        UIManager.put("RadioButtonMenuItem.font", font);
        UIManager.put("CheckBoxMenuItem.font", font);
        UIManager.put("PopupMenu.font", font);
        UIManager.put("OptionPane.font", font);
        UIManager.put("OptionPane.messageFont", font);
        UIManager.put("OptionPane.buttonFont", font);
        UIManager.put("Panel.font", font);
        UIManager.put("ProgressBar.font", font);
        UIManager.put("ScrollPane.font", font);
        UIManager.put("Viewport", font);
        UIManager.put("TabbedPane.font", font);
        UIManager.put("TableHeader.font", font);
        UIManager.put("TextField.font", font);
        UIManager.put("PasswordFiled.font", font);
        UIManager.put("TextArea.font", font);
        UIManager.put("TextPane.font", font);
        UIManager.put("EditorPane.font", font);
        UIManager.put("TitledBorder.font", font);
        UIManager.put("ToolBar.font", font);
        UIManager.put("ToolTip.font", font);
        UIManager.put("Tree.font", font);
        UIManager.put("Table.font", font);
    }/*from w w  w  .j a  v  a2 s . c om*/
}

Related

  1. setFontScale(float scale)
  2. setHtmlFont(HTMLDocument doc, Font font)
  3. setItalicFont(JComponent jcomp)
  4. setLabelProperties(JLabel label, Color color, Font font, Color bg)
  5. setMonospacedFont(JComponent component)
  6. setTitleLabelFont(JLabel label)
  7. setUIDefaultFont()
  8. setUIFont(final Font font)
  9. setUIFont(final Font font)