void (int oldIndex, int newIndex) { Object elementToMove = myBaseModel.getElementAt(oldIndex); if (newIndex > oldIndex) { newIndex--; } myBaseModel.removeElementAt(oldIndex); myBaseModel.insertElementAt(elementToMove, newIndex); }