• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI timeout in Java client application

 
Savithri Devaraj
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We like to implement a timeout in our Java client application (using JDK 1.1.8 and Swing 1.1.1) connecting to servlets on the SilverStream Application server.
The application consists of an input screen and depending on the request, an output screen. The user could expand/collapse the trees in the output screen or perform other requests on the input screen. If he is inactive for 20 minutes or more, we like to log him out and end the application after a message.
Does anyone know how we could implement this easily using the Swing GUI thread - keeping track for how long it has not performed any action in the user code??
If I have to write a new userInactiveTimer class, I will have to account for all actions on both the screens. I don't know if I am clear enough.
Any help/clue greatly appreciated,
Thanks,
Savithri
 
Savithri Devaraj
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Help Please!!
I could write a timer class and define a method to update the timer. In the ActionPerformed method of each and every button or component on either screen, I could update the timer. Is this the only way out? or, is there a simpler way to do this?
Any suggestions appreciated!!
Savithri
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Savithri,
It looks like you are not getting any response in this forum. I will move the thread to Java In General (Intermediate).
Bodie
 
Bob Moranski
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can make a timer and instantiate it in the global scope, reset it in each ActionListener, and System.exit(0) when 20 minute is reached.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic