S
stacey
Hello everyone,
I am encountering the following problem. I want to initialize a jTable
with data. The thing is that i have the data that will be inserted,
into 4 Vectors. Each Vector will be a column of the table. So i want
to insert the columns one by one with their data.
I know that there must be a way, but i haven't found anything yet,and
as i am new to Java, i am lost with all these models and stuff.
Can you give me an example code?
The solution i have found until now, is to make a String[][] data and
a String[] columnNames, and use do:
jTable1.setModel(new
javax.swing.table.DefaultTableModel(data,columnNames));
Thank you very much in advance,
Stacey Venturas.
I am encountering the following problem. I want to initialize a jTable
with data. The thing is that i have the data that will be inserted,
into 4 Vectors. Each Vector will be a column of the table. So i want
to insert the columns one by one with their data.
I know that there must be a way, but i haven't found anything yet,and
as i am new to Java, i am lost with all these models and stuff.
Can you give me an example code?
The solution i have found until now, is to make a String[][] data and
a String[] columnNames, and use do:
jTable1.setModel(new
javax.swing.table.DefaultTableModel(data,columnNames));
Thank you very much in advance,
Stacey Venturas.