question: public void actionPerformed ( ActionEvent e ) { if ( EDIT . equals ( e . getActionCommand ( ) ) ) { button . setBackground ( currentColor ) ; colorChooser . setColor ( currentColor ) ; dialog . setVisible ( true ) ; fireEditingStopped ( ) ; } else { currentColor = colorChooser . getColor ( ) ; } }
target:  Handles events from the editor button and from the dialog's OK button.