my dog learned polymorphism
The moose likes Beginning Java and the fly likes Swings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Swings" Watch "Swings" New topic


Chandra Moulee

Joined: Sep 26, 2005
Posts: 16
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.
Jeff Grant
Ranch Hand

Joined: Dec 19, 2001
Posts: 169
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

Joined: Aug 05, 2005
Posts: 3742
Originally posted by Chandra Moulee:
I tried it but i couldnt retrieve data from the array.Please help me its urgent.



Post your code and someone should be able to point out where you're going wrong.

I agree. Here's the link:
subject: Swings
It's not a secret anymore!