• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JComboBox not appearing

 
Ranch Hand
Posts: 51
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic