title: How to put timer into a GUI?
body: <p>I have a GUI with a form for people to fill up and I would like to put a countdown timer at the top right hand corner of the page</p>
  
  <p>Heres the method for the timer to get the remaining time. Say my form class is  FillForm and the timer method is found in Timer. </p>
  
  <p>How do I put a dynamic (constantly updating) timer inside of the GUI?</p>
  
  <pre><code>public String getRemainingTime() {
      int hours = (int)((this.remainingTime/3600000) % 60);
      int minutes = (int)((this.remainingTime/60000) % 60);
      int seconds = (int)(((this.remainingTime)/1000) % 60);
  
      return(format.format(hours) +  ":" +  format.format(minutes)+ 
            ":" +  format.format(seconds));       
  }
  </code></pre>
  
  <p>GUI is built using NetBeans GUI builder.</p>