Menu

#18 SComboBox.setSelectedIndex(int index)

open
5
2002-10-31
2002-10-31
No

SComboBox.setSelectedIndex(int index) doesn't work
immediately after refreshing the list in the combo box

example:

scombo.setSelector("list");
model.setList(newItems);
scombo.setSelectedItem(2);

The issue is that the ModelChangeEvent is processed in
the AWT worker thread, in parralel to the main thread,
and the main thread doesn't wait for it to finish.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.