void (@NotNull JTable table) { int visible = getVisibleRowCount(table); if (visible <= 0) { moveHome(table); return; } int step = visible - 1; ListSelectionModel selectionModel = table.getSelectionModel(); int index = Math.max(selectionModel.getMinSelectionIndex() - step, 0); int visibleIndex = getLeadingRow(table, table.getVisibleRect()); int top = visibleIndex - step; if (top < 0) { top = 0; } int bottom = top + visible - 1; _scrollAfterPageMove(table, top, bottom, index); }