protected void moveUpSelected(){
  int selectedIndex=table.getSelectedRow();
  if (selectedIndex > -1) {
    int index=data.moveUp(indexToModel(selectedIndex));
    setRowSelected(indexToView(index));
  }
}

protected void moveUpSelected ( ) { int selectedIndex = table . getSelectedRow ( ) ; if ( selectedIndex > - 1 ) { int index = data . moveUp ( indexToModel ( selectedIndex ) ) ; setRowSelected ( indexToView ( index ) ) ; } }
moves the selected item up in the model ( and table ) . this can behave kind of odd when the table is filtered or sorted automatically , so it should not be used then .
