OME
Class InputDialog

java.lang.Object
  |
  +--OME.InputDialog

public class InputDialog
extends java.lang.Object

This class provides a way of receiving a single line of input from the user using a dialog. It displays a question (request) and returns an answer using a static method. In the future, other static methods capable of receiving more than a single line of input could be added.


Constructor Summary
InputDialog()
          All methods of this class are currently static and thus this class should never be instantiated.
 
Method Summary
static java.lang.String getInput(javax.swing.JFrame parent, java.lang.String title, java.lang.String request, java.lang.String defaultanswer)
          This method provides a way of displaying a question (request) and receiving a single line of input from the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputDialog

public InputDialog()
All methods of this class are currently static and thus this class should never be instantiated.
Method Detail

getInput

public static java.lang.String getInput(javax.swing.JFrame parent,
                                        java.lang.String title,
                                        java.lang.String request,
                                        java.lang.String defaultanswer)
This method provides a way of displaying a question (request) and receiving a single line of input from the user. It creates a dialog which displays the request and has an input text field for the user to enter the input.
Parameters:
parent - the parent frame over which this dialog should be displayed. This dialog will be centered over the parent JFrame.
title - the title of the dialog diaplayed.
request - the question (request) to be asked from the user
defaultanswer - the default answer to above question. The user will usually ignore this default and enter some new answer.