Following the example here http://www.java2s.com/Code/JavaAPI/javax.swing/JOptionPaneshowInputDialogComponentpObjectmStringtintmIconiObjectoObjecti.htm
is it possible to somehow make the default jcombobox editable? There doesn’t seem to be any instantiation of JCombobox in the JOptionPane, is it possible to extend and override the default JCombobox used by JOptionPane?
You can do this with
showMessageDialog(), by creating aJComboBoxand transforming to editable withsetEditable().Example:
You can retrieve the value in the
JComboBoxwith: