return subElements;
return (MenuElement[]) subElements.toArray(new MenuElement[subElements.size()]);
  public MenuElement[] getSubElements()  {    Component[] items = getComponents();    MenuElement[] subElements = new MenuElement[items.length];    for (int i = 0; i < items.length; i++)      subElements[i] = (MenuElement) items[i];    return subElements;  }