public MenuItem(String name, char mnemonic, String accelerator, Object topMenu) {
		super(name);
		if(mnemonic != ' ') {
			setMnemonic(mnemonic);
		}
		if(accelerator != null) {
			setAccelerator(KeyStroke.getKeyStroke(accelerator));
		}
		if(topMenu instanceof Menu) {
			((Menu) topMenu).add(this);
		} else if(topMenu instanceof TablePopupMenu) {
			((TablePopupMenu) topMenu).add(this);
		}
	}