code: public static void scrollToRow(JTable table, int row)
      {
          Rectangle visibleRect = table.getVisibleRect();
          Rectangle cellRect = table.getCellRect(row, 0, true);
          Rectangle r = new Rectangle(
              visibleRect.x, cellRect.y, 
              visibleRect.width, cellRect.height);
          table.scrollRectToVisible(r);
      }
docs: Scroll the given table so that the specified row is visible.
  
  @param table The table
  @param row The row