Skip to Main Content

New to Java

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 won't open dropdown

casadelgato-JavaNetSep 20 2008 — edited Sep 20 2008
Okay, I'm feeling REALLY stupid today. I haven't had to use a JComboBox for years, and now the darn thing won't work.
I have a JComboBox (created via new JComboBox() ) in a BorderLayout panel, which is in a BoxLayout panel.
The program creates the panels and displays them, and initially there is nothing in the JComboBox, and it is disabled.
I then enable it, and use the addItem() method to add 2 Strings.
The strings get added, and I can switch between them using the up/down arrows on the keyboard.
But if I click on the little down arrow at the right of the JComboBox - nothing happens. No Dropdown.

I've GOT to be doing something incredibly stupid, but I haven't been able to figure out what.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 18 2008
Added on Sep 20 2008
5 comments
929 views