title: Runnable thread inside doInBackground (SwingWorker) ? Help please
body: <p>i am developing a client/server application where i have to use threads to not block the UI, the application looks like:</p>
  
  <p>So, the problem is that i can't specify a priority in SwingWorker, so what i did is:</p>
  
  <pre><code>...
  
          SwingWorker&lt;String, Object&gt; sw = new SwingWorker&lt;String, Object&gt;() {
  
                          @Override
                          public String doInBackground() {
  
                         //For example
                         Thread t1 = new Thread(jprogressbar);
                         t1.setPriority(Thread.MAX_PRIORITY);
                         t1.start();
                          }
      }
  
  
  ...
  </code></pre>
  
  <p>As you can see it looks pretty weird, because the thread is updating the JProgressBar, so i just want to create multiple tasks (threads) and to update the JProgressBar's, but i want to know the best way to do this, because i'm pretty sure that  i'm not doing the right thing because as you know, swing is not thread-safe, so i used SwingWorker. The application is working pretty fine, but i just want to know if is there a better way to do this?</p>
  
  <p>Thank you, i'd appreciate any answer.</p>
  
  <p>Screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/Z8v8w.png" alt="enter image description here"></p>