How can I get a list depends on the item selected from the previous list?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rasool Khan
    New Member
    • Apr 2011
    • 1

    How can I get a list depends on the item selected from the previous list?

    For example, if I selected country as INDIA from a dropdown, i want all the states in India to be listed in the next dropdown without connecting to database.?
  • rotaryfreak
    New Member
    • Oct 2008
    • 74

    #2
    you would need an action listener on your first jcombo box. Depending on your selection in the first jcombo box, your second one will reflect the selection from the first combo box. In other words, all your values must be hard coded in the second jcombo box and then you call the appropriate jcombox box depending which vales was chosen in your first jcombo box. Ive never done it myself, but that's the idea.

    Comment

    Working...