componentListener
Runs onComponentChange whenever the component is resized, moved, shown or hidden. Declare the four separately to tell them apart.
onComponentChange is read when the event fires, so writing a fresh lambda on every recomposition registers nothing again.
Return
this chain with the component callback declared on it.
Parameters
receives the event, whose id tells the four apart.
See also
Runs each lambda on the change it is declared for. A change left undeclared reports nowhere.
Each lambda is read when its event fires, so writing a fresh one on every recomposition registers nothing again.
Declaring none at all is refused.
Return
this chain with the component callbacks declared on it.
Parameters
runs after the size changed, so the component already reports the new one.
runs after the position changed, which is stated in the parent's coordinates.
runs when the component itself is made visible; a parent being shown does not reach it.
runs when the component itself is made invisible.
See also
Attaches a ComponentListener (addComponentListener/removeComponentListener).
Return
this chain with the component listener declared on it.
Parameters
attached by identity, so a remembered instance stays put while a fresh one on every pass is detached and re-added.