Module java.desktop
Package javax.swing

Class JComboBox<E>

java.lang.Object
Type Parameters:
E - the type of the elements of this combo box
All Implemented Interfaces:
ActionListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, ListDataListener

@JavaBean(defaultProperty="UI", description="A combination of a text field and a drop-down list.") public class JComboBox<E> extends JComponent implements ItemSelectable, ListDataListener, ActionListener, Accessible
A component that combines a button or editable field and a drop-down list. The user can select a value from the drop-down list, which appears at the user's request. If you make the combo box editable, then the combo box includes an editable field into which the user can type a value.

Warning: Swing is not thread safe. For more information see Swing's Threading Policy.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see XMLEncoder.

See How to Use Combo Boxes in The Java Tutorial for further information.

Since:
1.2
See Also: