E -这个模型的元素类型
public interface MutableComboBoxModel<E> extends ComboBoxModel<E>
ComboBoxModel。
| Modifier and Type | Method and Description |
|---|---|
void |
addElement(E item)
在模型的结尾添加一个项目。
|
void |
insertElementAt(E item, int index)
在一个特定的索引中添加一个项目。
|
void |
removeElement(Object obj)
从模型中移除一个项目。
|
void |
removeElementAt(int index)
在一个特定的索引中删除一个项目。
|
getSelectedItem, setSelectedItemaddListDataListener, getElementAt, getSize, removeListDataListenervoid addElement(E item)
ListDataListeners,项目已添加。
item -要添加的项目
void removeElement(Object obj)
ListDataListeners该项已被删除。
obj -
Object被删除
void insertElementAt(E item, int index)
ListDataListeners,项目已添加。
item -要添加的项目
index位置添加对象
void removeElementAt(int index)
ListDataListeners该项已被删除。
index项目的位置将被删除
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, 2014, Oracle and/or its affiliates. All rights reserved.