update JTable
Hi all,
I have a JTable in a JPanel, and the content of JTable is changing from time to time. I use following: javax.swing.JTable myTable =
new javax.swing.JTable(myVector, elementNames);
jScrollPane = new javax.swing.JScrollPane(myTable);
jScrollPane.getViewport().setViewPosition(new java.awt.Point(0,0));
add(jScrollPane);
Another method
public void updateTable(java.util.Vector oneLine, int index)
{
myVector.setElementAt(oneLine, index);
}
changes the content of myVector.
However, the content of JTable will not be automatically updated as I respected. Could some one tell me how can I update the JTable when a new line was appended?
Any suggestions will be greatly appreciated. Thanks!
eedych

