• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing + JComboBox  RSS feed

 
Vaibhav Manwatkar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I have three combo boxes and the data to be displayed in 2nd depends what is selected in 1st similarly 3rd combo data depends on 2nd. so i want it dynamic. I searched API's but I found no method to do this.

what should be the solution.
 
Henry Addo
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Why don't you get the item selected
from the first combo box then make a
condition so that when an item is selected
from the first combo box what is suppose to
be displayed in second combo box is displayed.
Hope it works
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here's a simple demo
(you could do this with just the one combo box if you wanted)

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!