V
VD
Programming in java for a while now, but I still have this silly
problem that I don't know if the experts has a simple answer.
I have a Swing app. Yes, simple stuff eh. Next, user logins to use
the app. If they don't do anything (mouse move, key press) for a
while, then I log out. The think is that detecting a mouse event, I
have to register with each of the tabpane of the app. I don't like
that. Also, I have to register with each components within the panel.
The same for keyboard. For keyboard, it seems I can register event
for just any component (with appropriate modifer to get the input map
and action map). However, I still have to register all keys which are
alot. I want the ability to catch the event from top down. Anyevent
would goes through my filters first. Would this be possible? How do
I solve this simple and common problem? Thank you very much in
advance.
problem that I don't know if the experts has a simple answer.
I have a Swing app. Yes, simple stuff eh. Next, user logins to use
the app. If they don't do anything (mouse move, key press) for a
while, then I log out. The think is that detecting a mouse event, I
have to register with each of the tabpane of the app. I don't like
that. Also, I have to register with each components within the panel.
The same for keyboard. For keyboard, it seems I can register event
for just any component (with appropriate modifer to get the input map
and action map). However, I still have to register all keys which are
alot. I want the ability to catch the event from top down. Anyevent
would goes through my filters first. Would this be possible? How do
I solve this simple and common problem? Thank you very much in
advance.