title: SwingWorker locks GUI on (unsuccessful) JLabel Icon updating
body: <p>Ok im really struggling with unlocking my GUI which is locked due to separate SwingWorker thread. Basically what my program does: Initializes webcam, and then grabs single frame and displays it as JLabel icon (doing single grab+display on Button click is ease, however i have immense difficulties in doing such operation consecutively in order to do some image processing). I am aiming to obtain such result:</p>
  <p>Grab frame -&gt; process it -&gt; display as ImageIcon of Jlabel  &gt; ... repeat  Grab frame &gt;...</p>
  <p>I need results while webcam is streaming, therefore i used SwingWorker <code>publish</code> and <code>process</code>. In my code &quot;processing part&quot; is not included as it is not necessary since i cant even obtain proper continuous frame grabbing. Generally my background thread will never finish unless cancelled (well thats the assumption as i want to process images as fast as possible with maximum frames per second - unless i should do it other way? - i guess separate thread for single frame grab&amp;process would be bad idea due to fact that im aiming to get 10+ FPS). I know my SwingWorker thread works, since i made tests of saving consecutive images to C:\, and it did work, but my GUI is locked anyway, but at least i know that thread is running and grabbing frames.</p>
  <p><strong>Generally i have 2 problems:</strong></p>
  <ul>
  <li>no JLabel icon update</li>
  <li>Locked GUI</li>
  </ul>
  <p>My SwingWorker code:</p>
  <pre><code>private class FrameStream extends SwingWorker&lt;Void, BufferedImage&gt; { 
      @Override
      protected Void doInBackground() throws InterruptedException{
          BufferedImage processedImage = null;
          
          while (!isCancelled()) {
              processedImage = getPIC_COLOR(player);
              publish(processedImage);
              
              Thread.sleep(5000); // i made such delay to check whether program is not &quot;choking&quot; with data, but its not the case, without this delay everthing is the same
          }            
          return null;
      }
  
      @Override
      protected void process(List&lt;BufferedImage&gt; mystuff) {
          Iterator it = mystuff.iterator(); 
  
          while (it.hasNext()) {
              img_field.setIcon(new ImageIcon(mystuff.get(mystuff.size()-1)));
          }
      }
  
      @Override
      protected void done() {            
          infoBAR.setText(&quot;FINISHED&quot;);
      }
  }
  </code></pre>
  <p>I am so desperate that i rewritten my code completely basing on tutorials example: <a href="http://download.oracle.com/javase/tutorial/uiswing/examples/concurrency/FlipperProject/src/concurrency/Flipper.java" rel="nofollow noreferrer">Flipper</a> as you can see it is ridiculously similar. All my previous efforts also locked gui so tried the 'tutorial way', nonetheless it did not work, which is a pity. Im in a dead end because i have no clue how to fix that. Im desperate for help since as you can see it seems exactly the same as the tutorial one, maybe something other causes issues: <a href="http://pastebin.com/3xX61P2Z" rel="nofollow noreferrer"><strong>MY FULL CODE</strong></a></p>
  <p>Please help, i'm unable to solve it by myself.</p>