private ProgramMenuBar findMenuBar() {
		for (Component comp = console; comp != null; comp = comp.getParent()) {
			if (comp instanceof Program) {
				return ((Program) comp).getMenuBar();
			} else if (comp instanceof JFrame) {
				Object mbar = ((JFrame) comp).getJMenuBar();
				return (mbar instanceof ProgramMenuBar) ? (ProgramMenuBar) mbar : null;
			}
		}
		return null;
	}