Java Equivalent to Get ForegroundWindow?
MSWindows native programming has a call named GetForegroundWindow(). This call returns the handle to an application window that currenlty is active (sometimes also termed as "has focus"). I'm looking for something equivalent in Java.
Note that any method that gets the name of the application (such as MSWord), and the file that is being processed (such as Document1.doc) will do.
It would also be nice to find a method of being notified by MSWindows when the foreground window changes.
And, finally, having this workable in both Linux and MSWindows would be great - even if the methods are different for the two operating systems.

