• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

regarding combobox in frame

 
sam sawant
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have 2 comboboxes
when i click on any item of combo box,other combobox values should change.
for eg
in 1st combobox values are(a,b,c)
if i select a
it shud display 1,2,3 in another combobox
sameways for b & c shud display something else

plzz help me
 
Maneesh Godbole
Saloon Keeper
Posts: 11065
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We don't just hand out ready made solutions here at the Ranch.
Tell us what you have tried to do and what problems you are facing and we will help you finding a solution.

Also please use real words.
http://faq.javaranch.com/java/UseRealWords
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
simplest way is to change combo2's model when combo1's selection changes
 
sam sawant
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whats the syntax to change combobox model?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> whats the syntax to change combobox model?

comboBox.setModel(...)

(your question indicates you should read sun's comboBox tutorial)
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic