onDetached

abstract fun onDetached(node: SwingComponentNode<*>)

Called on the Event Dispatch Thread when node detaches: it is reused, deactivated, released, moved to another composition, or its composition is disposed. A reused node is attached again right after.

While this runs, node still reports attached, whichever way it detaches, and what this records there is dropped when the call returns.

If this throws, the throwable is reported to the thread's uncaught-exception handler and node detaches as if this had returned: the reads and pending requests recorded under it are dropped, and a node that moves or is reused is attached again and onAttached is called for it. The composition goes on.