I would like to display two combo boxes side by side in a JOptionPane to allow the user to set both before selecting OK.
Can this be done with a small change?
In my code example I would like a combo with the otherValues to the right of the combo with the possibleValues in it.
import javax.swing.JOptionPane;
public class MultiComboOptionPane {
public static void main(String[] args) {
// Selection Set 1
Object[] possibleValues = { "One", "Two", "Three" };
// Selection Set 2
Object[] otherValues = { "Apple", "Pear", "Orange" };
Object selectedValue = JOptionPane.showInputDialog(null,
"Select Number",
"MultiCombo",
JOptionPane.QUESTION_MESSAGE,
null,
possibleValues,
possibleValues[0]);
}
}