C
Cyril Dex
Hi all
I have a JTable which uses a customised DefaultTableModel called
TableModel. TableModel extends DefaultTableModel.
Now the ResultViewer.java class that I have is supposed to display the
names of files and their properties in 3 columns. The ResultViewer is
supposed to update after every 20 secs. The problem is that when an
update occurs, an ArrayIndexOutOfBoundsException occurs. I think that
the array references a null pointer in the vector when its updating.
The update occurs by 1st clearing the existing table then updating it.
I think when the update occrus here it references null. Its more of a
logical error.
public void clearTable () {
for (int row = (table.getRowCount() -1) ; row >= 0; row--) {
((DefaultTableModel) table.getModel()).removeRow(row);
}
}
I've already tried the fireTableRowsUpdated method and it doesn't seem
to work.
Thanks in advance.
Cheers!
I have a JTable which uses a customised DefaultTableModel called
TableModel. TableModel extends DefaultTableModel.
Now the ResultViewer.java class that I have is supposed to display the
names of files and their properties in 3 columns. The ResultViewer is
supposed to update after every 20 secs. The problem is that when an
update occurs, an ArrayIndexOutOfBoundsException occurs. I think that
the array references a null pointer in the vector when its updating.
The update occurs by 1st clearing the existing table then updating it.
I think when the update occrus here it references null. Its more of a
logical error.
public void clearTable () {
for (int row = (table.getRowCount() -1) ; row >= 0; row--) {
((DefaultTableModel) table.getModel()).removeRow(row);
}
}
I've already tried the fireTableRowsUpdated method and it doesn't seem
to work.
Thanks in advance.
Cheers!