All Packages This Package Class Hierarchy Class Search Index
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Dialog
|
+----jkp.awt.GetTextDialog
| Summary |
public class GetTextDialog
extends java.awt.Dialog
implements jkp.awt.event.ActionPerformedOnAListener,
jkp.awt.event.ActionPerformedOnBListener
{
// Fields 2
private String text;
private TextField tf;
// Constructors 1
public GetTextDialog(Frame, String, String);
// Methods 4
public final void actionPerformedOnA(ActionEvent);
public final void actionPerformedOnB(ActionEvent);
public String getText();
public void setText(String);
}
Show a dialog to get a text value from the user.
| Fields |
· text | Summary | Top |
private String text
The text the user typed.
· tf | Summary | Top |
private TextField tf
A TextField for the user to respond in.
| Constructors |
· GetTextDialog | Summary | Top |
public GetTextDialog(Frame parent,
String title,
String prompt)
Constructs a new TextDialog with the given title and prompt.
Parameter Description parent The frame that owns this dialog. title The title for this dialog. prompt The prompt for the TextField.
| Methods |
· actionPerformedOnA | Summary | Top |
public final void actionPerformedOnA(ActionEvent ae)
The user chose the "OK" button.
Parameter Description ae The action performed ActionEvent.
- Implements:
- actionPerformedOnA in interface ActionPerformedOnAListener
· actionPerformedOnB | Summary | Top |
public final void actionPerformedOnB(ActionEvent ae)
The user chose the "Cancel" button.
Parameter Description ae The action performed ActionEvent.
- Implements:
- actionPerformedOnB in interface ActionPerformedOnBListener
· getText | Summary | Top |
public String getText()
Returns the text (if any) from this dialog's TextField.
- Returns:
- null if the user chose cancel, the text in the TextField if the user chose "OK"
· setText | Summary | Top |
public void setText(String text)
Sets the text in this dialog's TextField.
Parameter Description text The new text for the TextField.
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7