Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

"Idle Time Out" or "Session expires" functionality in Swing App ?  RSS feed

 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I want to implement an "Idle Time Out" or "Session expires" kind of functionality in Java Swing Applicaton.

Any pointers how we can achieve it?

Thanks
Abhay
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Abhay Agarwal:
I want to implement an "Idle Time Out" or "Session expires" kind of functionality in Java Swing Applicaton. Any pointers how we can achieve it?

I think that the Swing Timer may have what you are looking for. You give it the length of time to wait, and at the end of that time an action would be called. In this case the action would likely shut down a portion of your program and then call "stop" on the timer. You can find the API here.

Good luck.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!