@Override
    public void elementChosen(Object element) {
      //noinspection unchecked
      mySelectedClass = (T)element;
      close(OK_EXIT_CODE);
    }
@Override
    public void elementChosen(Object element)