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

9 Years
Discussion Span
Last Post by BestJewSinceJC

Nevermind. All of them should be user generated, that's the whole point. I got confused because I thought something was happening that was not happening. Or something. Either way it's been working for a while now.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.