Here you can find the source of newJLabel(String n, char m, Component c)
public static JLabel newJLabel(String n, char m, Component c)
//package com.java2s; //License from project: Apache License import java.awt.Component; import javax.swing.JLabel; public class Main { public static JLabel newJLabel(String n, char m, Component c) { JLabel l = new JLabel(n); l.setDisplayedMnemonic(m);/*from w w w. j a v a 2s . c om*/ l.setLabelFor(c); return l; } }