Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java itemstatechanged called twice

comboBox.addItemListener(new ItemListener() {
	@Override
    public void itemStateChanged(ItemEvent e) {
      if(e.getStateChange() == ItemEvent.SELECTED) { // Check if the value got selected, ignore if it has been deselected
        //Do stuff
      }
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #itemstatechanged #called
ADD COMMENT
Topic
Name
9+8 =