Vector comboBoxItems = new Vector();
DefaultComboBoxModel model;
// ComboBox Items have gotten from Data Base initially.
model = new DefaultComboBoxModel(ComboBoxItems);
JComboBox box = new JComboBox(model);
I added this combo box to a panel. If I add some items in the database directly, I want those newly added items shown in the combo box.
I can see the values in comboBoxItems when I debug, but those values do not appear in my combo box.
How can I get those newly added values into the combo box without closing the panel?
How about using ComboBoxModel? Something like this….