aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JComboBox not appearing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JComboBox not appearing" Watch "JComboBox not appearing" New topic
Author

JComboBox not appearing

John Corkrend
Ranch Hand

Joined: Oct 27, 2012
Posts: 51

I have been trying to get my JComboBox to appear without success. Here is my code.
I can get them to appear separately but not together, and I would like them both in the JPanel if possible.

Steve Myers
Ranch Hand

Joined: Dec 08, 2012
Posts: 47
You're add method isn't correct, try:



You should carefully read Java docs for the Swing components you're using. Also look at naming conventions - your class name is not capitalized.
One more thing, read up on the Event Dispatch Thread.
John Corkrend
Ranch Hand

Joined: Oct 27, 2012
Posts: 51

Steve Myers wrote:You're add method isn't correct, try:



You should carefully read Java docs for the Swing components you're using. Also look at naming conventions - your class name is not capitalized.
One more thing, read up on the Event Dispatch Thread.


Thanks for the fix, I'm looking into the naming conventions and the event dispatch thread.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JComboBox not appearing