Swing JComboBox & ItemListener

The example contains two JLabels, two JTextFields and a JComboBox. Note, the above screen shows Java Swing JComboBox as an editable type. When the user selects an item in the combo box, we show that in the first text box. We also show the past selected item in the Deselected JTextField. A combo box can show only one item once the drop-down is collapsed. So when the user picks an item, in combo box point of view, one item was selected by the user and one was de-selected (the previous one).