All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Acme.Widgets.OkCancelBox

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

public class OkCancelBox
extends ButtonDialog
An ok/cancel box.

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

Sample usage:


 OkCancelBox oc = new OkCancelBox( this, "Sample OkCancelBox" );
 oc.show();
 switch ( oc.getAnswer() )
     {
     case OkCancelBox.OK:
     [your code here]
     break;
     case OkCancelBox.CANCEL:
     [your code here]
     break;
     }
 

Fetch the software.
Fetch the entire Acme package.


Variable Index

 o CANCEL
 o OK

Constructor Index

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

Variables

 o OK
 public static final int OK
 o CANCEL
 public static final int CANCEL

Constructors

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

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


All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs