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
-
NO
-
-
result
- The user's answer to the question asked by the dialog.
-
YES
-
-
YesOrNoDialog(Frame, String, String[])
- Constructs a yes-or-no dialog window.
-
actionPerformed(ActionEvent)
- Handles events associated with the buttons.
-
getAnswer()
- Returns the user's answer.
NO
private static final String NO
YES
private static final String YES
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.
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.
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.
actionPerformed
public void actionPerformed(ActionEvent e)
- Handles events associated with the buttons. Provided for
ActionListener interface.
- Parameters:
- e - The event that triggered the action.