void goToSpecificColumn(int selectedIndex) { int row = table.getSelectedRow(); table.changeSelection(row, selectedIndex, true, true); }
/** * Move the currently selected cell up or down by one cell. * * @param direction -1 for previous, +1 for next. */ public void goToRow(int direction) { int row = table.getSelectedRow(); int column = table.getSelectedColumn(); table.changeSelection(row + direction, column, false, false); }