public void actionPerformed(ActionEvent e){
  if (e.getSource() == m_DefaultButton)   defaultFormat();
 else   if (e.getSource() == m_ApplyButton)   applyFormat();
}

public void actionPerformed ( ActionEvent e ) { if ( e . getSource ( ) == m_DefaultButton ) defaultFormat ( ) ; else if ( e . getSource ( ) == m_ApplyButton ) applyFormat ( ) ; }
responds to the user perfoming an action .
