Get current active window's title in Java
Posted
by Steven
on Stack Overflow
See other posts from Stack Overflow
or by Steven
Published on 2009-08-30T16:36:51Z
Indexed on
2010/04/01
5:23 UTC
Read the original article
Hit count: 721
I am trying to write a Java program that logs what application I'm using every 5 seconds (this is a time tracker app). I need some way to find out what the current active window is. I found KeyboardFocusManager.getGlobalActiveWindow() but I can't get it to work right. A cross platform solution is preferable, but if one doesn't exist, then I'm developing for linux with X.Org. Thanks.
© Stack Overflow or respective owner