Selects the first occurrence of the specified item in a single-selection combo box, and returns the zero-based index of the item.
public final int setSelectedItem( Object value )
value
The object (generally a String object) to select.
Returns the zero-based index of the selected item if it exists in the combo box; returns -1 if the item is not in the combo box.
If the specified item is not contained in the combo box, this method returns -1.
See Also getSelectedItem