开发者

How to get the name of global active window using Java?

I am work an Desktop Applicati开发者_如何学Con in which i need to save the name of corrently focused or active window name(mozilla firefox, or any other file name) in an text file currently I am using getActiveWindow() method of KeyboardFocusManager which give the name of active Window, or null if the active Window is not a member of the calling thread's context.

I want to get the name of Global Active window which corrently user is using.


You're probably out of luck if it has to be cross-platform. The Java VM only knows about the windows it controls. Now, you could likely do it in native code, through JNI, but you'd have to include native binaries for every platform you plan to deploy on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜