Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I detect when new windows are opened and/or get a list of open windows?

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.

like image 488
warrenm Avatar asked Oct 14 '22 22:10

warrenm


1 Answers

Like already said above you can only monitor windows created by Java apps. Getting that kind of information would require OS specific development (JNI).

like image 88
Giann Avatar answered Oct 18 '22 01:10

Giann