import javax.swing.JFrame; /* Author: James Tam Version: 2015 Learning objectives: 1) Using containers: JFrame 2) Using a subcontainer: JPanel 3) Capturing and distinguishing events from different buttons (via actionCommand) 4) Setting the 4 physical properites of a component (x,y,w,h) */ public class Driver { public static void main(String[] args) { JFrame f = new JFrame(); f.setSize(640,480); MyWindowListener mwl = new MyWindowListener(); f.addWindowListener(mwl); f.setVisible(true); } }