
JComboBox
Package: javax.swing
Description: a drop-down list user interface component. When a user
selects an item from the list, an ItemEvent is fired.
Constructor
JComboBox( Object [ ] arrayName )
constructs a new JComboBox component initially filled with the
objects in arrayName.Often,the objects are Strings.
Useful Methods of the JComboBox Class
Return value Method name and argument list
void addItemListener( ItemListener handler )
registers an event handler for ItemEvents on this combo box.
int getSelectedIndex( )
returns the index of the selected item.The index of the first item
in the list is 0.
void setMaximumRowCount( int size )
sets the number of ...