code: private void uninstallWindowListeners(JRootPane root) {
          if (window != null) {
              window.removeMouseListener(mouseInputListener);
              window.removeMouseMotionListener(mouseInputListener);
          }
      }
docs: Uninstalls the necessary Listeners on the <code>Window</code> the
  Listeners were last installed on.
  
  @param root the JRootPane.