• 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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An applet with 3 combo boxes. You make a selction in the first combobox, and based on that selection, the options are in the second combobox, then based on the second selection, the options for the third combobox appear. How do I get that started? Picture Ordering CDs'; the first box is the music type,(country, jazz, etc...), the second box is Artists for that selection, (Garth Brooks, Toby Keith...), and the third is albums, (Ropin' The Wind, Greatists Hits, etc...)I want the Country artists for the country selection, Jazz artists for Jazz selection and so on. Using NetBeans IDE 3.5.1 form editor.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think NetBeans Form Editor is going to help much, since this isn't really a layout issue, but an issue with the actual data behind the form. I'm also not sure how you're storing and accessing the data for this... it could be in a database, XML file, EJBs, etc. You also don't specify if you are using AWT or Swing for this, Swing would be easier, since it uses MVC and seperates the data a component holds from the visual representation of the component, but since you are using an Applet I'll assume AWT. Here's a quick example... it's not perfect in lots of ways... the data is hardcoded and stored in an internal hashtable for one, the user actually has to select a combobox before it's "child" combo is filled out, etc. but it should give you some idea of what to do:

 
reply
    Bookmark Topic Watch Topic
  • New Topic