Here you can find the source of applyFont(JPanel p)
static void applyFont(JPanel p)
//package com.java2s; //License from project: Open Source License import java.awt.*; import javax.swing.JPanel; public class Main { private static final Font guifont = new Font("Arial", Font.BOLD, 12); static void applyFont(JPanel p, Font font) { Component[] comps = p.getComponents(); for (Component c : comps) { c.setFont(font);//from w w w .j a v a2s . c om } } static void applyFont(JPanel p) { Component[] comps = p.getComponents(); for (Component c : comps) { c.setFont(guifont); } } }