This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JComboBox not appearing Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "JComboBox not appearing" Watch "JComboBox not appearing" New topic
Author

JComboBox not appearing

John Corkrend
Ranch Hand

Joined: Oct 27, 2012
Posts: 43

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: 42
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: 43

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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JComboBox not appearing
 
Similar Threads
Line spacing
A Paint Application with Combo Boxes and Buttons
Line spacing
Help with actionlisteners on a button.
Setting color in a JComboBox