// ReallyQuitDialog.java // // Mark F. Hulber // May 1996 // // // ReallyQuitDialog an extension of a YesNoDialog class opens and windows and // prompts the user for a confirmation of the desire to leave CG Drawing // Board. On receiving confirmation it kills the parent Frame thus // ending the entire application. // import java.awt.*; public class ReallyQuitDialog extends YesNoDialog { TextComponent status; Frame par; public ReallyQuitDialog(Frame parent, TextComponent status) { super(parent, "Don't Leave!", "Really Quit?", "Yes", "No", null); par = parent; this.status = status; } public void yes() { par.dispose(); } public void no() { if (status != null) status.setText("Quit cancelled."); } }