This is my 4th attempt at trying to figure out how to use a progressbar, this is what I have but its not working:


Code:
      class Counter extends Thread implements Runnable{
  /* This class simply runs a thread to count to 50 */
     public int count = 1;

      public void run() {
          while (count < 50) {
              try {
                  sleep(1000);
              Thread updateThread = new Thread(this, "Count Program");
            //updateThread.setPriority(NUMCOUNTERS+2);
               jProgressBar1.setValue(count);
              } catch (InterruptedException e) { }
            count++;
        }
			stop();
    }    
 }
    
}

How can I simply make the progressbar move 1 second at a time.

Help would be greatly appreciated