I'm trying to get the state of a window on Windows. I have to check if the window of word is active or inactive. I don't find any answer to this problem in Google. Does anyone knows how to do this or if this is possible at all?
Window activeWindow = javax.swing.FocusManager.getCurrentManager().getActiveWindow();
The code above returns always NULL.
Thank you for your answers.
Regards Roman