I want to write a component that monitors other activities, but it's listeners are to be removed when the component's window is closed.
I don't want to write this removal code many times, but want the component to handle it itself. (How) can i do it?
Thanks!