All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Acme.Widgets.YesNoBox

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----Acme.Widgets.ButtonDialog
                                           |
                                           +----Acme.Widgets.YesNoBox

public class YesNoBox
extends ButtonDialog
A yes/no box.

Puts up a dialog with a specified message and two buttons, Yes and No. All user input is locked out. The program can retrieve the user's answer via the getAnswer() method.

Sample usage:


 YesNoBox yn = new YesNoBox( this, "Sample YesNoBox" );
 yn.show();
 switch ( yn.getAnswer() )
     {
     case YesNoBox.YES:
     [your code here]
     break;
     case YesNoBox.NO:
     [your code here]
     break;
     }
 

Fetch the software.
Fetch the entire Acme package.


Variable Index

 o NO
 o YES

Constructor Index

 o YesNoBox(Frame, String)
Constructor, default title.
 o YesNoBox(Frame, String, String)
Constructor, specified title.

Variables

 o YES
 public static final int YES
 o NO
 public static final int NO

Constructors

 o YesNoBox
 public YesNoBox(Frame parent,
                 String message)
Constructor, default title.

 o YesNoBox
 public YesNoBox(Frame parent,
                 String title,
                 String message)
Constructor, specified title.


All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs