title: Thread end listener. Java
body: <p>Are there any Listeners in Java to handle that some thread have been ended?
  Something like this:</p>
  
  <pre><code>Future&lt;String&gt; test = workerPool.submit(new TestCalalble());
  test.addActionListener(new ActionListener()               
     {                                                         
      public void actionEnd(ActionEvent e)               
      {                                                        
          txt1.setText("Button1 clicked");                        
      }                                                        
     });
  </code></pre>
  
  <p>I know, that it is impossible to deal like this, but I want to be notified when some thread ended.</p>
  
  <p>Usually I used for this Timer class with checking state of each Future. but it is not pretty way.
  Thanks</p>