for (int i = 0; i < newRecipeActions.length; i++) { newRecipeMenu.add(newRecipeActions[i]); newRecipeInFolderMenu.add(newRecipeActions[i]);
for (int i = 0; i < organizer.newRecipeActions.length; i++) { newRecipeMenu.add(organizer.newRecipeActions[i]); newRecipeInFolderMenu.add(organizer.newRecipeActions[i]);
  public OrganizerMouseListener(Organizer organizer,                                OrganizerTree workspace) {    this.organizer = organizer;    this.workspace = workspace;    // set up experiment submenus    for (int i = 0; i < newExperimentActions.length; i++) {      newExperimentMenu.add(newExperimentActions[i]);      newExperimentInFolderMenu.add(newExperimentActions[i]);    }    // set up recipe submenus    for (int i = 0; i < newRecipeActions.length; i++) {      newRecipeMenu.add(newRecipeActions[i]);      newRecipeInFolderMenu.add(newRecipeActions[i]);    }    for (int i = 0; i < rootMenuItems.length; i++) {      if (rootMenuItems[i] instanceof Action)        rootMenu.add((Action)rootMenuItems[i]);      else        rootMenu.add((JMenuItem)rootMenuItems[i]);    }    for (int i = 0; i < experimentMenuItems.length; i++)       experimentMenu.add((Action)experimentMenuItems[i]);    for (int i = 0; i < societyMenuItems.length; i++)      societyMenu.add((Action)societyMenuItems[i]);    for (int i = 0; i < recipeMenuItems.length; i++)      recipeMenu.add((Action)recipeMenuItems[i]);    for (int i = 0; i < folderMenuItems.length; i++) {      if (folderMenuItems[i] instanceof Action)        folderMenu.add((Action)folderMenuItems[i]);      else        folderMenu.add((JMenuItem)folderMenuItems[i]);    }  }