Class SimpleComboBox

All Implemented Interfaces:
ActionListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, ListDataListener

public class SimpleComboBox extends JComboBox

Simple ComboBox component to add items with an associated code. Typical usage would be adding Strings items and associated action codes. Example

SimpleComboBox combo = new SimpleComboBox();
 combo.addItem("Left", TextComponent.ALIGN_LEFT);
 combo.addItem("Right", TextComponent.ALIGN_RIGHT;
 combo.addItem("Center", TextComponent.ALIGN_CENTER);
 combo.addItem("Justify", TextComponent.ALIGN_JUSTIFY);
 . . .
 int textAlign = combo.getSelectedCode();
 textComponent.align(textAlign);
 

This component provides a basic selection autocompletion when the user presses a key (while the combo has the focus).

Author:
Cesar Martinez Izquierdo invalid input: '<'cesar.martinez@iver.es>
See Also: