How can I check if an event is user generated? When the user clicks on a combo box and changes the displayed/selected content, I want the code in the itemStateChanged method to be executed. But I only want this code to be executed if the method call was due to a user generated event, not a programmatically generated one. How can I differentiate?
itemStateChanged(ItemEvent e){
if (user_generated){
//do stuff here
}
}
actually it'd be actionPerformed in this case, but the question remains the same