path[i] = (MenuElement) selection.get (i);
path[i] = (MenuElement) selectedPath.get(i);
  public MenuElement[] getSelectedPath ()  {    MenuElement[] path = new MenuElement[selection.size ()];    for (int i = 0; i < path.length; i++)      path[i] = (MenuElement) selection.get (i);    return path;  }