wood burning stoves*
The moose likes Swing / AWT / SWT and the fly likes JOptionPane showInputDialog : own textfield or combobox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane showInputDialog : own textfield or combobox" Watch "JOptionPane showInputDialog : own textfield or combobox" New topic
Author

JOptionPane showInputDialog : own textfield or combobox

Alex Iordache
Ranch Hand

Joined: Mar 13, 2001
Posts: 62
Hi,
Reading the API of JOptionPane in the most parameters showInputDialog (see copy below), at the end I
read :
It is up to the UI to decide how best to represent the selectionValues, but usually a JComboBox, JList,
or JTextField will be used.
How can I self make a "JOption input pane", where I already have set a value in the inputfield of the
pane?
Please add codesnippit,
Thanks,
javabit
showInputDialog
public static Object showInputDialog(Component parentComponent,
Object message,
String title,
int messageType,
Icon icon,
Object[] selectionValues,
Object initialSelectionValue)

Prompts the user for input in a blocking dialog where the initial selection, possible selections, and
all other options can be specified. The user will able to choose from selectionValues, where null implies
the user can input whatever they wish, usually by means of a JTextField. initialSelectionValue is the
initial value to prompt the user with. It is up to the UI to decide how best to represent the selectionValues,
but usually a JComboBox, JList, or JTextField will be used.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JOptionPane showInputDialog : own textfield or combobox