Modifier and Type | Method and Description |
---|---|
void |
addActionListener(ActionListener listener)
adds an action listener to the Button.
|
int |
getSelectedIndex()
returns the currently selected item index.
|
void |
setSelectedIndex(int index)
selects the item in combobox whose index is given.
|
setEnabled, setVisible
void setSelectedIndex(int index)
selects the item in combobox whose index is given, to 'un-select' all, use -1.
index
- the index of the item to be selected or -1 to un-select
everything.int getSelectedIndex()
void addActionListener(ActionListener listener)
The action listener is invoked when the user selects a value from the combobox.
The action listener is invoked if the button is clicked and the the action listener to add
listener
- the action listener to add