void (final ActionEvent e) { final int rowCount=getRowCount(); LOG.assertTrue(rowCount>0); int selectedRow=getSelectedRow(); if(selectedRow!=-1){ selectedRow -= 1; } selectedRow=(selectedRow+rowCount)%rowCount; if(isEditing()){ finishEditing(); getSelectionModel().setSelectionInterval(selectedRow,selectedRow); scrollRectToVisible(getCellRect(selectedRow, 0, true)); startEditing(selectedRow); } else { getSelectionModel().setSelectionInterval(selectedRow,selectedRow); scrollRectToVisible(getCellRect(selectedRow, 0, true)); } }