docs: private void detach() {
          // Do not call setVisible(false) here: that would make it invisible by default (detach() is called in attach())
  
          if (decoratedComponent != null) {
              decoratedComponent.removeComponentListener(decoratedComponentTracker);
              decoratedComponent.removeAncestorListener(decoratedComponentTracker);
              decoratedComponent.removeHierarchyBoundsListener(decoratedComponentTracker);
              decoratedComponent.removeHierarchyListener(decoratedComponentTracker);
              decoratedComponent.removePropertyChangeListener("enabled", decoratedComponentTracker);
              decoratedComponent.removePropertyChangeListener("ancestor", decoratedComponentTracker);
              decoratedComponent = null;
  
              detachFromLayeredPane();
          }
      }