File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes ComboBox won't drop down Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "ComboBox won Watch "ComboBox won New topic

ComboBox won't drop down

Colin Spear

Joined: Jul 10, 2002
Posts: 5
Ok, not a novice to java, but a novice to swing...I added a JComboBox to a JFrame to the NORTH part of the border layout, in the CENTER I have a JTextArea.
The JComboBox is initially empty when I add it and items are added at runtime. Problem is that when I click on the down arrow at run time nothing happens. I can navigate through the selected items with the arrow keys, but I can't seem to get the box to drop.
Apologies...on further investigation it seems that the JTextArea immediately below the combo box is covering the output...damn, now to figure out how to move the textarea into the background.
[ October 02, 2003: Message edited by: Colin Spear ]
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Make sure that you are actually using JTextArea and not just TextArea... AWT components are heavyweight and you will run into problems like you described when you mix them with Swing JComponents.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: ComboBox won't drop down
It's not a secret anymore!