public synchronized void addActionListener(ActionListener listener){
  actionListeners.addElement(listener);
}

public synchronized void addActionListener ( ActionListener listener ) { actionListeners . addElement ( listener ) ; }
register an object that wishes to be alerted when an item on this menu bar has been selected . < p / > please note , the actioncommand property of the action event will inform the listener as to which menu item that has been selected . not all listeners will be interested in all menu items .
