general input timeout

One idea for implementing a general input timeout, both for keyboard and mouse-click onany component on the app window(s), is to run an alert/shutdown timer as a separate thread. The timer should be reset and restart from zero at any input on the components. However, for this scheme to work, I'm afraid we should add a specific mouse listener and a key listener onto every component on the app. What could be a better and simpler design for the control of that kind of timer?

Thanks in advance.

[517 byte] By [hiwaa] at [2007-11-26 16:09:53]
# 1
reply #6 here, from the-usual-suspect :-), might suit your needs http://forum.java.sun.com/thread.jspa?threadID=786293
Michael_Dunna at 2007-7-8 22:32:14 > top of Java-index,Desktop,Core GUI APIs...
# 2
Thanks! I was not aware of that. Again and again, camickr the great is the savior.
hiwaa at 2007-7-8 22:32:14 > top of Java-index,Desktop,Core GUI APIs...