JTableModel
well,
hope everyone knows that the Abstract table model needs a
rowData [][]
which is a 2D array
now i am converting a result set to this data as follows
int i = 0; //counts the number of rows in the resultset
while(rs.next())
i++;
int datasize = i;
System.out.println(i);
rowData = new Object[datasize][rsmd.getColumnCount()];//rsmd is the ResultSetMetaData
i=0;
rs.beforeFirst();//put cursor at the beginning of the resultset
while(rs.next()) {
j=1;
while(j<=rsmd.getColumnCount()) {
rowData[j-1] = rs.getObject(j); //assign value in the rowData
System.out.println(j);
j++;
}
i++;
}
catch......and so on
I have implemented the other methods such as getValueAt, getRowCount, etc
but when i call this class in the program and
i pass this class ie the implemented abstracttablemodel to the table, it shows the number of columns and rows as well as the names of columns correctly......but then there is no data displayed inside the table cells....
please tell me why it is so?
Is there any other method to implement theabstract table modelso that the resultset that is supppplied to it, will be converted to JTable data....

