Hi friend,
Please refer following example of AbstractButton of java:
Code:
import javax.swing.AbstractButton;
import javax.swing.JFrame;
public class AbstractButtonDemo {
public static void main(String[] amb) {
JFrame frame1 = new JFrame();
frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
AbstractButton bn1 = new JButton();
bn1.setMultiClickThreshhold(1000);
bn.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
System.out.println("action"); }
};
frame1.add(bn1);
frame1.setSize(400, 200);
frame1.setVisible(true);
}
}
Bookmarks