Example usage for javax.swing AbstractButton addPropertyChangeListener

List of usage examples for javax.swing AbstractButton addPropertyChangeListener

Introduction

In this page you can find the example usage for javax.swing AbstractButton addPropertyChangeListener.

Prototype

public void addPropertyChangeListener(PropertyChangeListener listener) 

Source Link

Document

Adds a PropertyChangeListener to the listener list.

Usage

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