I am trying to perform an action whenever a selected item on the combobox changes. one particular scenario, when action listener is not notified, is when you reset the model on the combobox. I can subscribe with another PropertyChangedListener and listen when the model changes, and then extract selected item, but I simply do not understand why the selected item changed event is not raise dwhen model changes. visually your selection does change, even if you query the cobox for a selected item, it does change from null to some object… ANy clear olution to this, rather than using two separate listeners?
I am trying to perform an action whenever a selected item on the combobox
Share
If the action and item listeners don’t fire events when model is reset, you can fire those event by yourself by subclassing JComboBox:
But IMHO it is a bug – you should report that to the official bugzilla.