if (editorTable != null && model != null) {
int index = editorTable.getSelectedRow();
if (index == -1) index = 0;
DatasetEditorModelRow row = model.getRowAtIndex(index);
editorTable.stopCellEditing();
editorTable.selectRow(row.getIndex());
DatasetRecordEditorDialog editorDialog = new DatasetRecordEditorDialog(row);
editorDialog.show();
}
}