Thom Burnett wrote:
> 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
>
The only way would be by subclassing and changing the method. But that
would break the MVC model of Swing. Also, there isn't any problem with
calling the method the way you describe; I do it all the time. That IS
what the method is used for.
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing