title: How to implement and mantain multiple actionListener
body: <p>Ok, I have one class (let's call it: MenuBarClass) that contain multiple Menu and MenuItem.
  I whant assign to every MenuItem an actionlistener, but.. instead of doing something like:</p>
  
  <pre><code>menuitem_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {} });
  menuitem_2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {} });
  menuitem_3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {} });
  // ...
  menuitem_N.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {} });
  </code></pre>
  
  <p>I whant my code more mantainable and.. more important.. I don't whant a lots of "if" in one huge ActionListener class like:</p>
  
  <pre><code>public void actionPerformed(ActionEvent e) {
    if (e.getSource().equals(menuitem_1)) {
      //do stuff..
    } else if (e.getSource().equals(menuitem_2)) {
      //do stuff..
    } else ...
  }
  </code></pre>
  
  <p>how can i do this, if it is possible?
  Can anyone help?</p>