Class YesOrNoDialog

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----YesOrNoDialog

public class YesOrNoDialog
extends Dialog
implements ActionListener
Version:
$Revision: 1.5 $, $Date: 2000/10/30 17:01:27 $
Author:
John Cavanaugh

Variable Index

 o NO
 o result
The user's answer to the question asked by the dialog.
 o YES

Constructor Index

 o YesOrNoDialog(Frame, String, String[])
Constructs a yes-or-no dialog window.

Method Index

 o actionPerformed(ActionEvent)
Handles events associated with the buttons.
 o getAnswer()
Returns the user's answer.

Variables

 o NO
 private static final String NO
 o YES
 private static final String YES
 o result
 private boolean result
The user's answer to the question asked by the dialog. True if the "Yes" button was pressed, false if the "No" button was pressed.

Constructors

 o YesOrNoDialog
 public YesOrNoDialog(Frame frame,
                      String title,
                      String text[])
Constructs a yes-or-no dialog window.

Parameters:
frame - the parent frame.
title - a title for the window.
text - the text to be displayed.

Methods

 o getAnswer
 public boolean getAnswer()
Returns the user's answer.

Returns:
the user's answer to the question. True if the "Yes" button was pressed, false otherwise.
 o actionPerformed
 public void actionPerformed(ActionEvent e)
Handles events associated with the buttons. Provided for ActionListener interface.

Parameters:
e - The event that triggered the action.