Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swings

 
Chandra Moulee
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Please help me.This is very urgernt.I have a combobox and a listbox when i click a button the content of the combobox and flistbox should be saved to a vector.On selecting the value of the combobox the content of the listbox should be displayed.
eg. there is 1,2,3,4 in a combobox and 1.1,1.2,1.3 in a listbox if I select value 1 from the combobox and save it should be saved along with the values of the listbox.Than again if i select 1 than the value 1.1,1.2,1.3 must be displayed in the listbox.Same for 2,3 and 4.Please help me its very urgent.
Is there any other methods other than Vector.
Thanks
Chandramouli.V.N
 
Jeff Grant
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would place the contents of the combo box and list box in a multi-dimensional array. Lets say that column 0 would be the contents of the combo box and columns 1+ would be the list box. Then place an action listener on the combo box and populate the list box according to the selection.
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chandra Moulee:
I tried it but i couldnt retrieve data from the array.Please help me its urgent.

Thanks

Chandramouli.V.N.


Post your code and someone should be able to point out where you're going wrong.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic