javax.swing

Interface MutableComboBoxModel

public interface MutableComboBoxModel extends ComboBoxModel

A data model used in {@link JComboBox}es that keeps track of the components data and provides methods to insert and remove elements from it. The classes implementing this interface should fire appropriate events indicating the undergoing change in the data model.
Method Summary
voidaddElement(Object object)
This method adds given object to its data model.
voidinsertElementAt(Object object, int index)
This method inserts givent element to the data model, at the specified index.
voidremoveElement(Object object)
This method removes given element from the data model
voidremoveElementAt(int index)
This method removes elements located at the given index in the data model.

Method Detail

addElement

public void addElement(Object object)
This method adds given object to its data model.

Parameters: object element to add to the data model.

insertElementAt

public void insertElementAt(Object object, int index)
This method inserts givent element to the data model, at the specified index.

Parameters: object element to insert index index specifying the position in the data model where the given element should be inserted.

removeElement

public void removeElement(Object object)
This method removes given element from the data model

Parameters: object element to remove.

removeElementAt

public void removeElementAt(int index)
This method removes elements located at the given index in the data model.

Parameters: index index specifying location of the element to remove.