Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Premature swing timer execution in Linux

843805Aug 10 2006 — edited Aug 10 2006
I have a swing timer that logs off a user from the gui after a certain amount of time. When I run the program in Windows it works just as it should.

When I execute the same program in a linux environment it logs off randomly, sometimes after a few seconds, sometimes after a few minutes, and sometimes not at all. It is supposed to logoff after 30mins.
javax.swing.Timer timer = new javax.swing.Timer(logoffTime * 1000 * 60, new ActionListener()   
 {
      public void actionPerformed(ActionEvent evt) 
      {
            timer.stop();    //stop timer
            loginFrame.setVisible(true);  //sends user back to logon page
            conn.close();   // Database Connection
      }
 });

if(logoffTime > 0)
   timer.start();
Any ideas?

Thanks,
Casen

Message was edited by:
zispeedyiz
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 7 2006
Added on Aug 10 2006
1 comment
158 views