import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JOptionPane;
/*
 * GenericExtendedButton.java
 *
 * Created on February 8, 2006, 12:16 PM
 *
 */

/**
 *
 * @author Bill Kraynek
 */
public class GenericExtendedButton extends JButton {
    // class fields go here
    private String name;
    
    /** Creates a new instance of GenericExtendedButton */
    public GenericExtendedButton(String name) {
        this.name = name;
        this.setText(name);
        this.addActionListener(new GenericExtendedButtonAction());
        // more stuff can go here
    }// end constructor
    
    class GenericExtendedButtonAction implements ActionListener {
        public void actionPerformed(ActionEvent e) {
            // put "button action" statements here
            JOptionPane.showMessageDialog(null,"Button " + name + " was clicked.");            
        }// end actionPerformed
    }// end GenericExtendedButton class
    
}// end GenericExtendedButton class

