Share this page 

Scroll a JTable to the last rowTag(s): Swing


// 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
    }