code: public void setAllowSelection(boolean allowSelection) {
          if (this.allowSelection == allowSelection) {
              return;
          }
          this.allowSelection = allowSelection;
          setCaretInternal();
          firePropertyChange("allowSelection", !allowSelection, allowSelection);
      }
docs: Set whether or not selection should be allowed in this pane.