Here you can find the source of newJButton(String name, String tooltip, ActionListener al)
public static JButton newJButton(String name, String tooltip, ActionListener al)
//package com.java2s; //License from project: Apache License import java.awt.event.ActionListener; import javax.swing.JButton; public class Main { public static JButton newJButton(String name, String tooltip, ActionListener al) { JButton b = new JButton(name); b.setToolTipText(tooltip);/*from www . j a v a 2 s .c om*/ b.addActionListener(al); return b; } }