This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes GUI timeout in Java client application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "GUI timeout in Java client application" Watch "GUI timeout in Java client application" New topic

GUI timeout in Java client application

Savithri Devaraj
Ranch Hand

Joined: Jun 26, 2000
Posts: 103
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,
Savithri Devaraj
Ranch Hand

Joined: Jun 26, 2000
Posts: 103
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!!
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
It looks like you are not getting any response in this forum. I will move the thread to Java In General (Intermediate).
I agree. Here's the link:
subject: GUI timeout in Java client application
It's not a secret anymore!