title: Java - Work with time (hours and minutes)
body: <p>I want to retrieve the current system hour and when the user clicks on Button1 the var "ct" will the the current system hour + 1.</p>
  
  <p>Then, I want that when the var ct = current system hour the program sets a textfield text as "Done" but I can't seem to be able to work with the time. </p>
  
  <p>I have in main class: </p>
  
  <pre><code>Calendar now = Calendar.getInstance();
          int hour = now.get(Calendar.HOUR_OF_DAY);
          int minute = now.get(Calendar.MINUTE);
          int second = now.get(Calendar.SECOND);
  int ct=0;
  
  
  When user click Button1
    name = jTextField1.getText();
           ct = minute + 1;     
          jLabel3.setText("Ends at "+ct);
  </code></pre>
  
  <p>Now how can I permanently run a method to check if ct = current hour?</p>