HI,
I use a showInputDialog to display a comboBox for the user to choose an item in it. But i want him to be able to add a new Value in this combo box but i don't find how to do that.
Here is my code
Object[] possibleValues = {"1","2","3"};
Object selectedValue = JOptionPane.showInputDialog(null,"Enter IP", "Connection",JOptionPane.PLAIN_MESSAGE, null,possibleValues, possibleValues[0]);
Tahnks for your help
I use a showInputDialog to display a comboBox for the user to choose an item in it. But i want him to be able to add a new Value in this combo box but i don't find how to do that.
Here is my code
Object[] possibleValues = {"1","2","3"};
Object selectedValue = JOptionPane.showInputDialog(null,"Enter IP", "Connection",JOptionPane.PLAIN_MESSAGE, null,possibleValues, possibleValues[0]);
Tahnks for your help