title: How to signal that multiple SwingWorkers are all done?
body: <p>I have the following issue, or want to do, that I have n running SwingWorkers, the number can vary between 1 and 10. I start them from a main thread, and create them in n numbers, then let them run. After all n SwingWorkers are done, I want to do another task, which basically uses information, the SwingWorkers processed and join them all in the main thread to do something with it. But for this task to begin, all n SwingWorkers need to be finished/done and all n SwingWorkers need to be finished successfully.</p>
  <p>What would be the best way to do this? Is there a mechanism in Java already, which does something like this, like a ThreadManager, where you can put multiple SwingWorkers into, and then it fires a doneAll() or something like that to the main thread?</p>
  <p>The main thread does other things in the meantime, and cant just wait for the n SwingWorkers to finish. I need an &quot;all done&quot; fire event somehow.</p>
  <p>I though of creating another thread in the main thread, which runs a while loop (untillAllSWFfinished), with a wait 500ms in the loop to check, but that seems a bit dirty to  me.</p>
  <p>Is there a more elegant way to achieve this?</p>