import java.awt.*; import java.lang.*; public class MyDial extends Frame { Button quit; TextArea messagearea; String message; MyDial(String title) { super("IQPuzzle Designers"); Font f = new Font ("TimesRoman", Font.BOLD,36); quit = new Button("Quit"); message = new String("Chris Ly and Dave Shaffer\n Millersville University\n CopyRight (c) 1996"); messagearea = new TextArea(message); this.setLayout(new BorderLayout()); this.add("Center",messagearea); Panel p = new Panel(); p.setLayout(new FlowLayout(FlowLayout.CENTER)); p.add(quit); this.add("South",p); this.show(); } public boolean action(Event evt, Object obj) { if (evt.target instanceof MenuItem) { String label = (String)obj; if (label.equals("Quit")) { this.hide(); this.dispose(); } } else if (evt.target == quit) { this.hide(); this.dispose(); } else if (evt.id == Event.WINDOW_DESTROY) { hide(); } return true; } public boolean handleEvent(Event event) { if (event.id == Event.WINDOW_DESTROY) { dispose(); return true; } else { return super.handleEvent(event); } } }