ListBox.insertItem

Overview | Methods | Fields | This Package | All Packages

ListBox.insertItem

Adds an item to the list box at the specified position.

Syntax

public final void insertItem( int index, Object item )

Parameters

index

The zero-based position where you want to insert the item into the list box.

item

The object (generally a String object) whose toString property returns the string you want to display in the list box.

Exceptions

WFCInvalidArgumentException thrown if the specified index is not valid.

Remarks

Items inserted into a list box using this method are not sorted, even if the sorted property is set to true. To add an item that is inserted into the list alphabetically when the sorted property is set to true, use the addItem method.