Java Swing Font Change installFont(Component c, Font font)

Here you can find the source of installFont(Component c, Font font)

Description

install Font

License

Open Source License

Declaration

public static void installFont(Component c, Font font) 

Method Source Code

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

import java.awt.Component;

import java.awt.Font;

import javax.swing.plaf.UIResource;

public class Main {
    public static void installFont(Component c, Font font) {
        /* 2329 */Font f = c.getFont();
        /* 2330 */if ((f == null) || ((f instanceof UIResource)))
            /* 2331 */c.setFont(font);
        /*      */}
}

Related

  1. changeFontSize(final int size)
  2. changeFontSize(Font font, float factor)
  3. changeFontStyle(Font font, int style)
  4. changeFontToItalic(final JComponent component)
  5. installFont(Component c, Font font)