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;

import javax.swing.plaf.UIResource;

import java.awt.*;

public class Main {
    public static void installFont(Component c, Font font) {
        Font f = c.getFont();//from  w ww  . j  a va 2 s. c o  m
        if (f == null || f instanceof UIResource) {
            c.setFont(font);
        }
    }
}

Related

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