subElements = ((MenuElement) selection.get (i)).getSubElements ();
subElements = ((MenuElement) selectedPath.get(i)).getSubElements();
  boolean isComponentPartOfCurrentMenu (Component c)  {    MenuElement[] subElements;    for (int i = 0; i < selection.size (); i++)      {        subElements = ((MenuElement) selection.get (i)).getSubElements ();        for (int j = 0; j < subElements.length; j++)          {            if ((subElements[j].getComponent ()).equals (c))              return true;          }      }    return false;  }