@Override public void actionPerformed(ActionEvent event){
  String command=event.getActionCommand();
  if (command.equals("SelectFont")) {
    attemptFontSelection();
  }
 else   if (command.equals("SelectPaint")) {
    attemptPaintSelection();
  }
 else   if (command.equals("ShowTitle")) {
    attemptModifyShowTitle();
  }
}

@ Override public void actionPerformed ( ActionEvent event ) { String command = event . getActionCommand ( ) ; if ( command . equals ( "SelectFont" ) ) { attemptFontSelection ( ) ; } else if ( command . equals ( "SelectPaint" ) ) { attemptPaintSelection ( ) ; } else if ( command . equals ( "ShowTitle" ) ) { attemptModifyShowTitle ( ) ; } }
handles button clicks by passing control to an appropriate handler method .
