List of usage examples for javax.swing AbstractButton addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
From source file:AbstractButtonPropertyChangeListener.java
License:asdf
public static void main(String[] a) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); AbstractButton bn = new JButton("asdf"); bn.addPropertyChangeListener(new AbstractButtonPropertyChangeListener()); bn.setText("fdsa"); frame.add(bn);//w ww . jav a 2 s . co m frame.setSize(300, 200); frame.setVisible(true); }