1comboBox.addItemListener(new ItemListener() {
2 @Override
3 public void itemStateChanged(ItemEvent e) {
4 if(e.getStateChange() == ItemEvent.SELECTED) { // Check if the value got selected, ignore if it has been deselected
5 //Do stuff
6 }
7 }
8});