// in the your JTable
// jump to last row
rowCount = table.getRowCount () - 1;
showCell(rowcount, 0);
// jump to first row
showCell(0, 0);
public void showCell(int row, int column) {
Rectangle rect =
getCellRect(row, column, true);
scrollRectToVisible(rect);
clearSelection();
setRowSelectionInterval(row, row);
getModel().fireTableDataChanged(); // notify the model
}
Written and compiled by Réal Gagnon ©1998-2005
[ home ]