public static JMenuItem createMenuItem(String label, String tooltip, String iconFilename, int key, int mnemonic, jpe win) {
		JMenuItem menuitem = new JMenuItem(label);
		menuitem.addActionListener(win);
		if (iconFilename != null) {
			menuitem.setIcon(new ImageIcon("images"+fileSep +  iconFilename));
	//		menuitem.setIcon(icon);
		}

		if (tooltip != null) {
			menuitem.setToolTipText(tooltip);
		}

		if (key != 0) {
			if (key == 'c') {
				menuitem.setAccelerator(KeyStroke.getKeyStroke('C',
						ActionEvent.CTRL_MASK + ActionEvent.ALT_MASK));
			} else if (key == 'x') {
				menuitem.setAccelerator(KeyStroke.getKeyStroke('X',
						ActionEvent.CTRL_MASK + ActionEvent.ALT_MASK));
			}
			if (key == 'a') {
				menuitem.setAccelerator(KeyStroke.getKeyStroke('A',
						ActionEvent.CTRL_MASK + ActionEvent.SHIFT_MASK));
			} else if (key == 'd') {
				menuitem.setAccelerator(KeyStroke.getKeyStroke('D',
						ActionEvent.CTRL_MASK + ActionEvent.SHIFT_MASK));
			}

			else if (key == '|') {
				menuitem.setAccelerator(KeyStroke.getKeyStroke('J',
						ActionEvent.CTRL_MASK + ActionEvent.ALT_MASK));
			}

			else {
				menuitem.setAccelerator(KeyStroke.getKeyStroke(key,
						ActionEvent.CTRL_MASK));
			}

		}

		if (mnemonic != 0) {
			menuitem.setMnemonic(mnemonic);
		}

		menuitem.setFont(SYSTEM_FONT);

		return menuitem;
	}