-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
5.0u2
-
generic
-
solaris_10
bustos 2005-10-15
I gave an experimental implementation of ComboBoxModel to a
JComboBox, and it refused to fire the proper events when the
user selected an item. A few hours later I discovered that
it was because my getElementAt() method was returning a new
array each time, so JComboBox.setSelectedItem() couldn't
find it in the model and just gave up. JComboBox should
throw an error or complain, or at the very least, the
documentation for ComboBoxModel should warn about this.
I gave an experimental implementation of ComboBoxModel to a
JComboBox, and it refused to fire the proper events when the
user selected an item. A few hours later I discovered that
it was because my getElementAt() method was returning a new
array each time, so JComboBox.setSelectedItem() couldn't
find it in the model and just gave up. JComboBox should
throw an error or complain, or at the very least, the
documentation for ComboBoxModel should warn about this.