Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JComboBox not appearing

 
John Corkrend
Ranch Hand
Posts: 51
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 51
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic