When the combobox is in a non-popped-up state, it looks like a JButton with a "diamond" character on the right. To make the popup menu appear, the user positions the cursor over the combobox and presses ENTER.
When the user selects an item in the popup menu (by positioning the cursor on it and pressing ENTER), the pop-up menu disappears and only the selected item is shown. At the same time the JComboBox posts an ActionEvent onto the system event queue. The "action command" encapsulated in the ActionEvent is the list item that was selected.
Note that this class provides an "Uneditable" JComboBox only.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|