differentiate between user selection and "additem" method in combobox
I'm trying to find a way for a JComboBox
action listener or item listener to differentiate between
the user making a selection and the invocation of methods
such as removeAllItems() and addItem(). As far as I've
been able to see, the ActionEvents and ItemEvents are
exactly the same.
I don't want actionperformed to be called in additem or removeallitems function.
I want actionperformed to be called when only user change combobox items.
How can I solve this problem?