Firstly this is not a duplicate of this question: JavaFX 2 User Idle Detection as that question is only concerned if the user is not using their application. My question is about knowing if the user is using any application on the computer or none at all.
I think after a few attempts the easiest way to ask this question is to provide a scenario. User logs on to the PC, and my application is started.
The user might make some changes to my application and then minimize the window and start working on some project, a word document or what ever. All this time my application is idle as the user is not using it, but they are still using the computer.
After 15 or 20 minutes working on their word document they get up and walk to the kitchen to make a sandwich.
After they have been away from the computer for a short time they come back and start work on the word document again.
How does my javafx application detect that they have been away in the kitchen for 5 or 6 minutes and pop up a window to ask for input when they return? The user should not need to maximize my application window manually, it should happen automatically.