1 Reply Latest reply: Oct 4, 2009 10:13 AM by 843807 RSS

    writing function to print limited time

      Hai sir,this is surendra i developed a software for online examination i have problem with printing the limited time can yoiu give the code of th function to print the limited time from the bean
        • 1. Re: writing function to print limited time
          if you are using SWING all you have to do is set up a Timer (javax.swing.Timer) and check the time each time it fires.

          in your constructor get a reference to the Calendar object:
          Calendar c = Calendar.getInstance();
          when you start your timed event:
          long myStartTime = c.getTimeInMillis();
          when you want to check--each time the timer object fires (in the actionPerformed of your ActionListener for the Timer)
            //your make it exit code goes here