ListBox.getSelectedIndices

Overview | Methods | Fields | This Package | All Packages

ListBox.getSelectedIndices

Retrieves an array that contains the zero-based indices of all currently selected items.

Syntax

public final int [] getSelectedIndices()

Return Value

Returns an integer array containing the zero-based indices of all currently selected items. In a single-selection list box, returns an array containing a single element. If there are no selected items in the list box, returns an empty array.