Click to See Complete Forum and Search --> : JOptionPane with editable inputframe


ljosephp
04-08-2004, 11:31 AM
Is there a method to get user input by using a drop down menu, and if the item is not held in the menu then the user can type one in in the box? Such as below, only with the box editable

Object[] possibilities = {"ham", "spam", "yam"};
String s = (String)JOptionPane.showInputDialog(
frame,
"Complete the sentence:\n"
+ "\"Green eggs and...\"",
"Customized Dialog",
JOptionPane.PLAIN_MESSAGE,
icon,
possibilities,
"ham");

cheers all