E
- the type of the elements of this modelComboBoxModel<E>
, ListModel<E>
DefaultComboBoxModel
public interface MutableComboBoxModel<E> extends ComboBoxModel<E>
ComboBoxModel
.Modifier and Type | Method | Description |
---|---|---|
void |
addElement(E item) |
Adds an item at the end of the model.
|
void |
insertElementAt(E item,
int index) |
Adds an item at a specific index.
|
void |
removeElement(Object obj) |
Removes an item from the model.
|
void |
removeElementAt(int index) |
Removes an item at a specific index.
|
getSelectedItem, setSelectedItem
addListDataListener, getElementAt, getSize, removeListDataListener
void addElement(E item)
ListDataListener
s that the
item has been added.item
- the item to be addedvoid removeElement(Object obj)
ListDataListener
s that the
item has been removed.obj
- the Object
to be removedvoid insertElementAt(E item, int index)
ListDataListener
s that the
item has been added.item
- the item to be addedindex
- location to add the objectvoid removeElementAt(int index)
ListDataListener
s that the
item has been removed.index
- location of the item to be removed Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps