question: public void actionPerformed ( ActionEvent ae ) { String cmd = ae . getActionCommand ( ) ; if ( cmd == TimerStatus . TIMER_FORWARD ) { timeHandler . setClockDirection ( 1 ) ; timeHandler . startClock ( ) ; } else if ( cmd == TimerStatus . TIMER_BACKWARD ) { timeHandler . setClockDirection ( - 1 ) ; timeHandler . startClock ( ) ; } else if ( cmd == TimerStatus . TIMER_STEP_BACKWARD ) { timeHandler . stepBackward ( ) ; } else if ( cmd == TimerStatus . TIMER_STEP_FORWARD ) { timeHandler . stepForward ( ) ; } else if ( cmd == TimerStatus . TIMER_STOPPED ) { timeHandler . stopClock ( ) ; } }
target:  ActionListener Interface Method listens to the timer, in case something else starts it, we can update the gui. Also listens to this button, to start and stop the given timer.