• 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Dynamic JComboBox Help

 
Greenhorn
Posts: 17
jQuery Firefox Browser PHP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I'm having some trouble trying to get my JComboBox working properly... Basically, I have a JMenuBar with several options, and depending on what the user chooses from that menu, a combo box will be populated with a different string of options. So for example, I have 2 JMenu items: "Cars" and "Animals." Clicking on the "Cars" option will populate a JComboBox with 3 options: "Chevy", "Ford", "Hyundai". Clicking on "Animals" will populate it with "Cat", "Dog", "Bird", "Fish".

How would that be done? I was looking for an example of using the ABstractListModel ant DefaultcomboBoxModel to do this but I couldn't find a whole lot on Google or on the Sun website and I'm not sure where to start. Any help would be great!
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
reply deleted

I just love wasting my time
http://forum.java.sun.com/thread.jspa?threadID=754443&tstart=0

won't happen again Al/mistah-java/whatever else

aren't ignore lists great
[ July 22, 2006: Message edited by: Michael Dunn ]
 
Al Swensen
Greenhorn
Posts: 17
jQuery Firefox Browser PHP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry... I posted there first, because I couldn't get to the Java Ranch site when I had this problem. Is there something wrong with getting mutiple opinions on a problem? Java Ranch is always my first choice for getting help with programming problems, as I've been helped several times here -- I just coudn't get to the site the other day. So sorry if I "wasted your time", that wasn't my intention at all. :/
 
lowercase baba
Posts: 13073
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i believe the unofficial policy of the ranch is that we don't care if you post to other forums. We don't want you to post the same question more than once here, however (i.e don't post in "Java in General - Beginners" if you've already posted it in the SWING forum).
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[response deleted, please check your private messages - Ilja]
[ July 24, 2006: Message edited by: Ilja Preuss ]
 
I don't even know how to spell CIA. But this tiny ad does:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic