code: public final void setCancelable(final Cancelable cancelable) {
          if (SwingUtilities.isEventDispatchThread()) {
              setCancelableIntern(cancelable);
          } else {
              try {
                  SwingUtilities.invokeLater(new Runnable() {
                      public void run() {
                          setCancelableIntern(cancelable);
                      }
                  });
              } catch (final Exception ex) {
                  ignore();
              }
          }
      }
docs: Sets the listener to inform about the user cancelling the current
  transfer.
  
  @param cancelable
  Listener or <code>null</code> if cancel is disabled.