public @Nullable T getSelectedElement() {
    int viewRow = getSelectedElementRow();
    int modelRow = viewRow < 0 ? -1 : myTable.convertRowIndexToModel(viewRow);
    return modelRow < 0 ? null : myTableModel.getElementAt(modelRow);
  }
public @Nullable T getSelectedElement()