All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.StringChooser

java.lang.Object
   |
   +----com.sun.java.swing.StringChooser

public class StringChooser
extends Object

Constructor Index

 o StringChooser()

Method Index

 o ask(JFrame, String, String, int, ChangeListener)
Convenience method to prompt for a String.
 o ask(JFrame, String, String[], int, ChangeListener)
Convenience method to prompt for a String from a set of Strings.

Constructors

 o StringChooser
 public StringChooser()

Methods

 o ask
 public static String ask(JFrame parent,
                          String description,
                          String initial,
                          int columns,
                          ChangeListener target)
Convenience method to prompt for a String.

Parameters:
fparent - the parent frame for the dialog box. fparent may be null if a default parent has been established with StandardDialog
description - a description string that will be shown to the user to indicate what is being requested
initial - the initial value for the string
columns - the default width (in 'm's) of the TextField
target - the ChangeListener that will be informed if the OK or Apply buttons are hit.
Returns:
If target is null, the dialog box will be modal and the method will return the final result, or null if cancelled. Otherwise, the dialog box is non-modal, the method returns null immediatly, and the listener is informed when appropriate. The source of the change event will be a JTextField.
See Also:
StandardDialog
 o ask
 public static int ask(JFrame parent,
                       String description,
                       String set[],
                       int initial,
                       ChangeListener target)
Convenience method to prompt for a String from a set of Strings.

Parameters:
fparent - the parent frame for the dialog box. fparent may be null if a default parent has been established with StandardDialog
description - a description string that will be shown to the user to indicate what is being requested
set - the set of strings
initial - the default choice from the set
target - the ChangeListener that will be informed if the OK or Apply buttons are hit.
Returns:
If target is null, the dialog box will be modal and the method will return the index of string from the set, or -1 if cancelled. Otherwise, the dialog box is non-modal, the method returns 0 immediatly, and the listener is informed when appropriate. The source of the change event will be a JComboBox.
See Also:
StandardDialog

All Packages  Class Hierarchy  This Package  Previous  Next  Index