/**
 * Test using buttons. Identical to code in lecture slides.
 * Thu Apr 6
 */
import javax.swing.JFrame;
import javax.swing.JButton;
import java.awt.event.ActionListener;

public class ButtonTester
{
  public static void main(String[] args)
  {
    JFrame myframe = new JFrame();
    final int F_WIDTH = 100;
    final int F_HEIGHT = 60;
    myframe.setSize(F_WIDTH, F_HEIGHT);
    myframe.setTitle("Button Tester");
    myframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    
    JButton button = new JButton("Click me!");
    myframe.add(button);
    ActionListener listener = new ClickListener();
    button.addActionListener(listener);

    myframe.setVisible(true);
  }
}
