title: Why my GUI in java Freeze when I start calculation in Java
body: <p>I am developing a java application </p>
  
  <p>but my application Freeze when I start the process of my application</p>
  
  <p>therefore I can update my GUI during the process </p>
  
  <p>do you guys have any idea how to fixed this ?</p>
  
  <p>I'll appreciate for your reply thx</p>
  
  <p>Guys I already try this but it still freezes the GUI</p>
  
  <p>here are my Code</p>
  
  <pre><code>final String key = keywords;
          final int dept = dep;
          final double rele = relevance;
  
          SwingWorker worker = new SwingWorker&lt;Map, Void&gt;() {
              @Override
              public Map doInBackground() {
                  final Map resultMap = focusedCrawlingMain.Search(key, dept, rele);  
  
                  return resultMap;
              }
  
              public void Done(Map dataMap) {
                  final List resultList = (List) dataMap.get("relevantList");
                  List resultListValue = (List) dataMap.get("relevantListScore");
                  int size = resultList.size();
  
                  newData = new String[size][3];
                  for(int i = 0; i &lt; size; i++){
                      newData[i][0] = String.valueOf(i+1);
                      newData[i][1] = String.valueOf(resultList.get(i));
                      newData[i][2] = String.valueOf(resultListValue.get(i));
                      model.addRow((new Object[]{newData[i][0],newData[i][1],newData[i][2]}));
                  }
              }
          };
          worker.run();
  </code></pre>