Class PromptWindow
java.lang.Object
|
+--PromptWindow
- public class PromptWindow
- extends java.lang.Object
Implements pop-up input boxes which displays a message and prompts the
user for a text.
Since the class only contains one static method and nothing else, it
should normally not be instantiated. The static method can be called
directly using PromptWindow.displayPrompt("Title","A message.")
.
Method Summary |
static java.lang.String |
displayPrompt(int x,
int y,
java.lang.String title,
java.lang.String message)
Displays a prompt window containing a message and an input field. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PromptWindow
public PromptWindow()
displayPrompt
public static java.lang.String displayPrompt(int x,
int y,
java.lang.String title,
java.lang.String message)
- Displays a prompt window containing a message and an input field.
The method blocks until the user enters a text.
Note: Depending on which window manager/window system
you use, both window title and position might be ignored.
- Parameters:
x
- The x coordinate of the alert window.y
- The y coordinate of the alert window.title
- The string to be displayed in the title bar of
of the window associated with the alert box.message
- The string to be displayed in the alert box.
- Returns:
- a string containing the entered text.