private void deinstall(final Component component, @Nullable AWTEvent cause) {
    if (component == null) {
      return;
    }

    if (component instanceof Container container) {
      int componentCount = container.getComponentCount();
      for (int i = 0; i < componentCount; i++) {
        deinstall(container.getComponent(i));
      }
      container.removeContainerListener(this);
    }

    component.removeFocusListener(this);
    componentUnregistered(component, cause);
  }
private void deinstall(final Component component, @Nullable AWTEvent cause)