Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JComboBox not visually updating after setSelectedItem

aardvarkkNov 10 2010 — edited Nov 11 2010
Hi there,

I'm having a strange problem wherein I have a JComboBox item, I call setSelectedItem, and visually the control does not update. It will update if I drag the window wider or move my mouse over it, but not immediately after the call. Isn't there some sort of hookup already there such that calling setSelectedItem should automatically update the combo box visually? What am I missing? Do I have to call some sort of repaint on the control after setting the selected item, or have I done something improperly?

Thanks in advance for any help you can provide me with -- this is driving me nuts!

Edited by: aardvarkk on Nov 10, 2010 7:21 PM
This post has been answered by walterln on Nov 11 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 9 2010
Added on Nov 10 2010
28 comments
4,108 views