void (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); if (getFocusedComponent() == component) { setFocusedComponentImpl(null, cause); } }