title: how to do something while you are waiting a Thread.join()
body: <p>I'm trying to do something while my Thread is waiting for a join() method
  all i want to do is  only change the name of the button while waiting but it's not working... and i don't know why
  here's my awful code:</p>
  
  <pre><code> if( e.getSource()==botonFiltro ){
              double [] datosFiltro2 = {
                      (Double.parseDouble(montoTextField.getText())),//0monto
                      (Double.parseDouble(txtPorcentaje.getText())/100),//1porcentaje
                      (Double.parseDouble(txtPrecio.getText())),//2precio
                      (Double.parseDouble(txtRango.getText())/100),//3rango
                      (Double.parseDouble(txtPMasDuro.getText())/100)//4pMasDuro
                      };
              double [] datosFiltro1= {};
              botonFiltro.setText("Filtrando");
              HiloLanzarFiltro hilo = new HiloLanzarFiltro(programa, datosFiltro1, datosFiltro2);
              Thread tFiltrando = new Thread(hilo);
              tFiltrando.start();
              try {
  //              while(tFiltrando.isAlive()){
  //                  botonFiltro.setText("Filtrando.");
  //                  Thread.sleep(500);
  //                  botonFiltro.setText("Filtrando..");
  //                  Thread.sleep(500);
  //                  botonFiltro.setText("Filtrando...");
  //                  Thread.sleep(500);
  //              }
                  tFiltrando.join();
              } catch (InterruptedException e1) {
  //              
              }
              this.programa= hilo.getPrograma();
              String[] l = new String[programa.getCompañias().size()];
              int i= 0;
              for(Compañia c: programa.getCompañias()){
                  l[i++]=c.getSymbol();
              }
              JListaPrincipal.setListData(l);
              lblCompaiasEncontradas.setText("Compa\u00F1ias encontradas: "+programa.getCompañias().size());
              botonFiltro.setText("Filtrar");
  
          }
  </code></pre>
  
  <p>The commented lines are the "thing" that i wanted to do...
  Thanks.</p>