public static JMenu buildMenu(String name, String[] items, String[] ...strings) {
		int subIndex = 0;
		JMenu menu = new JMenu(name);
		for (String itemName : items) {
			if (itemName.equals("-")) {
				menu.addSeparator();
			} else {
				String action = itemName;
				if (itemName.contains("<")) {
					action = itemName.substring(itemName.indexOf("<") + 1, itemName.indexOf(">"));
					itemName = itemName.substring(0, itemName.indexOf("<"));
					action += "-" + itemName;
				} 
				if (itemName.contains("->")) {
					itemName = itemName.replaceAll("->", "");
					if (strings.length >= subIndex + 1) {
						JMenu sub = buildMenu(itemName.replace("->", ""), strings[subIndex]);
						menu.add(sub);
					}
					subIndex++;
				} else {
					JMenuItem item = new JMenuItem(itemName);
					item.addActionListener(actionListener);
					item.setActionCommand(action);
					menu.add(item);
				}
			}
		}
		menu.getPopupMenu().setLightWeightPopupEnabled(false);
		return menu;
	}