List of usage examples for javax.swing AbstractButton getItemListeners
@BeanProperty(bound = false)
public ItemListener[] getItemListeners()
ItemListener
s added to this AbstractButton with addItemListener(). From source file:Main.java
public static void main(String[] args) { AbstractButton jb = new JButton("Press Me"); jb.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent ev) { System.out.println("ItemEvent!"); }//from w ww .j a v a2 s. co m }); ItemListener[] lis = jb.getItemListeners(); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(jb); f.pack(); f.setVisible(true); }