title: Refresh jTextField following a timer
body: <p>I'm working on an assignment for Java subject. I'm using NetBean IDE. My assignment requests me to make a word game. The game I'm designing involves a timer with delay of 1000 ms. The timer decrements a variable from 30 to 0. The timer itself is working. It is placed in the main function of GUI class. The problem I'm facing that I don't know how I'm supposed to update a jTextfield with everytime the variable is decremented. </p>
  
  <pre><code>public static void main(String args[]) {
  
      Time counter=new Time();
  ActionListener actListner = new ActionListener() {
              public void actionPerformed(ActionEvent event) {
  
              counter.decTime();
               jTime.setText("Time left: " + counter.getTime());
  
  
  }
  
  
  
   };
            Timer timer = new Timer(1000, actListner);
              timer.start();
      /* Create and display the form */
      java.awt.EventQueue.invokeLater(new Runnable() {
          public void run() {
              new StartGUI().setVisible(true);
  
  
          }
      });
  }
  </code></pre>
  
  <p>I'm not sure how to implement this properly </p>
  
  <pre><code>jTime.setText("Time left: " + counter.getTime());
  </code></pre>