void (AWTEvent event) { if (event instanceof ContainerEvent containerEvent) { Component child = event.getID() == ContainerEvent.COMPONENT_ADDED ? containerEvent.getChild() : null; if (child instanceof JComponent jComponent && !(event.getSource() instanceof CellRendererPane)) { ClientProperty.put(jComponent, ADDED_AT_STACKTRACE, new Throwable()); } } }