It appears that when setSelectedItem(object) is called on a JComboBox and the object passed in is different from the item already selected then the combo box fires off an action. This causes a variety of problems. In some cases it can lead to unwanted recursions and infinite loops.

Disabling the combo box doesn't seem to be sufficient. Putting in a bunch of flags to ignore events becomes a maintenance problem. How do you change the selected item on a combo box without sending off events?

-- 
Thom Burnett
 


Reply via email to