I would like to add a function to an existing class that does the following:
- Create a countdown for, say, 45 seconds
- If there is no active mouse movement in the applet, the countdown continues (45, 44, 43, etc)
- If there is any mouse movement, reset the timer back to 45 seconds
(lather, rinse, repeat)
I have NEVER coded in Java before, so I'm completely clueless here. The less complicated the better. My main goal here is to make sure the user is actively using the applet. After so many seconds of inactivity, I want to redirect the user to a "timeout" page (say, timeout.htm).
Anyone out there that can help me out?
I am open to any and all suggestions & advice. Thanks!