I am aware of WindowListener
and its ilk, but these only seem to provide events for windows to which you have a reference already and can add the listener to. I'm wondering how to either receive a callback when new windows are created by other processes, or poll for a list of all windows currently open on the system.
I'm using J2SE on Mac OS X, but a cross-platform answer is ideal.