views:

115

answers:

1

I am work an Desktop Application 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.

+1  A: 

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.

Curtis
Hey thanks wiki for the reply, but is there any other way to do it because I have to develop an application for cross platform but specially for Linux machine ... could you please help me ....
Ansh J