public interface ComboBoxModel extends ListModel
JComboBox. This model keeps track of elements
contained in the JComboBox as well as the current
combo box selection. Whenever the selection in the JComboBox
changes, the ComboBoxModel should fire a ListDataEvent
to the model's ListDataListeners.| Modifier and Type | Method and Description |
|---|---|
Object |
getSelectedItem()
Returns the currently selected item in the combo box.
|
void |
setSelectedItem(Object item)
Sets the selected item in the combo box.
|
addListDataListener, getElementAt, getSize, removeListDataListenervoid setSelectedItem(Object item)
ListDataEvent to all registered
ListDataListeners to indicate that the selection has changed.item - the selected item (null permitted).Object getSelectedItem()
null).