import java.awt.Frame; import java.awt.event.*; import java.awt.Image; import java.awt.Toolkit; /** * Creates a frame that closes * * @version 1.0 of 10/27/99 * @author Gail Bonath * @author Joe Pipkins * @author Minna Mahlab * @author Kate Ducey */ class FrameThatCloses extends Frame { public FrameThatCloses () {setTitle ("NorthCampus"); setSize (300,200); addWindowListener (new WindowAdapter() {public void windowClosing (WindowEvent e) {System.exit (0); } }); } } public class FirstTest {public static void main(String[] args) {Frame frame=new FrameThatCloses(); frame.show(); } }