Here you can find the source of newLabel(String text, int fontStyle)
public static JLabel newLabel(String text, int fontStyle)
//package com.java2s; import javax.swing.JLabel; public class Main { public static JLabel newLabel(String text, int fontStyle) { JLabel label = new JLabel(text); label.setFont(label.getFont().deriveFont(fontStyle)); return label; }//from w ww .j a v a2 s. com }