Java JButton Create newJButton(String name, String tooltip, ActionListener al)

Here you can find the source of newJButton(String name, String tooltip, ActionListener al)

Description

new J Button

License

Apache License

Declaration

public static JButton newJButton(String name, String tooltip, ActionListener al) 

Method Source Code

//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;
    }
}

Related

  1. newButton(String name, String text)
  2. newButton(String text, ActionListener... listeners)
  3. newButtonPopup(final JToggleButton button)
  4. newButtonsFrom(Collection action)
  5. newJButton()