private void installMenuBar(ProgramMenuBar menuBar, Frame frame) {
		if (Platform.isMac() && macMenuBarFlag) {
			frame.setMenuBar(menuBar.createOldStyleMenuBar());
		} else {
			try {
				Class frameClass = frame.getClass();
				Class[] types = { menuBar.getClass() };
				Object[] args = { menuBar };
				Method setJMenuBar = frameClass.getMethod("setJMenuBar", types);
				setJMenuBar.invoke(frame, args);
			} catch (Exception ex) {
				frame.setMenuBar(menuBar.createOldStyleMenuBar());
				frame.pack();
			}
		}
	}