Click to See Complete Forum and Search --> : Vectors transfer...Please help, Thank you


February 25th, 2000, 01:03 PM
Hi, I have a vector V that has [200,20,24,25] and a rowdata vect that has [Alg1,Alg2], I want to create a data Vdata vector that gets data from
V and rowdata , I am comfused I want thing after word to be in the table like this :
-----------------------------------------
Column0 Column1 Column2
-----------------------------------------
Ag1 200 20
-----------------------------------------
Alg2 24 2
----------------------------------------

kib63613
February 25th, 2000, 06:34 PM
how about this way :
create a class , say, RowData which consist of three members. It might look like this :
public RowData {
public String col_1;
public String col_2;
public String col_3;
}
get your data from Vectors and put the value to the corresponding field. After
the task fo transferring values, you may put the instance of RowData into the
Vector by Vector.addElement() method.
good luck