title: Giving JMenuItem's name to it's ActionListener
body: <p>How can I give my <code>JMenuItem</code>s names that the <code>ActionListener</code> attached to them will look at?</p>
  
  <p>I've got a menu system that's handled by a single <code>ActionListener</code>, and some items in those menus duplicate names.  This isn't a problem on the user end, because it's obvious what does what; in fact, it would be more confusing if they had different names.  However, at my end, I want to label each item uniquely.</p>
  
  <p>The section that creates my items looks like this:</p>
  
  <pre><code>String label = getLabel(forThisItem);
  JMenuItem item = new JMenuItem(label);
  item.setName(parentMenu.getName() + "_" + label);
  item.addActionListener(actionListener);
  parentmenu.add(item);
  </code></pre>
  
  <p>Interrogating the item afterwards (and outside the scope of this method) with getName() gives the name I gave it, as it should, but the output of</p>
  
  <pre><code>public void actionPerformed(ActionEvent ae) {
      String actionPerformed = ae.getActionCommand();
      System.out.println("actionPerformed: " + actionPerformed);
  }
  </code></pre>
  
  <p>is the the, possibly duplicated, name that the user sees, specified by <code>label</code>, not the unique name that I gave it.</p>
  
  <p>How can I give the right information to the ActionListener?</p>