title: Adding a chronometer to a JLabel
body: <p>I am struggling with getting a chronometer into a jLabel or jTextfield. My first class is a GUI Where I will want to display the chronometer in a jLabel or JTextField. My second class is where I made the chronometer, which works fine showing it on the console. My question is how can I make the run() method of the chronometer to change the jLabel of the GUI class instead of showing in the console.</p>
  
  <p>Chronometer class:</p>
  
  <pre><code>    public void run()
      {
      increaseTime();
      Paciente.tfTime.setText((getTime()));
      }  
  </code></pre>
  
  <p>GUI class(Paciente):</p>
  
  <pre><code>private void bStartActionPerformed(java.awt.event.ActionEvent evt) {                                       
              setTime();
  }
  
  public void setTime(String time)
  {
      Timer timer = new Timer();
      Chronometer chron = new Chronometer();
      timer.schedule(chron, 1000, 1000);
  }
  </code></pre>
  
  <p>Thanks</p>