question: public synchronized void addActionListener ( ActionListener actionListener ) { if ( actionListeners == null ) actionListeners = new ArrayList < ActionListener > ( ) ; actionListeners . add ( actionListener ) ; if ( fired ) { actionListener . actionPerformed ( new ActionEvent ( this , ActionEvent . ACTION_PERFORMED , "" ) ) ; } }
target:  Adds a listener that will be notified upon completion of all of the running threads. Its actionPerformed method will be called immediately if the threads already finished.