public JMenuBar createMenuBar() {
		// Create the menu bar
		final JMenuBar menuBar = new JMenuBar();

		// Menu for all beans to demo
		JMenu componentsMenu = new JMenu("Components");
		componentsMenu.setMnemonic('C');

		menuBar.add(componentsMenu);

		for (int i = 0; i < beans.length; i++) {
			Icon icon;
			JMenuItem menuItem;

			try {
				URL iconURL = beans[i].getClass().getResource(
						"images/" + beans[i].getName() + "Color16.gif");
				icon = new ImageIcon(iconURL);
				menuItem = new JMenuItem(beans[i].getName(), icon);
			} catch (Exception e) {
				System.out.println("JCalendarDemo.createMenuBar(): " + e
						+ " for URL: " + "images/" + beans[i].getName()
						+ "Color16.gif");
				menuItem = new JMenuItem(beans[i].getName());
			}

			componentsMenu.add(menuItem);

			final JComponent bean = beans[i];
			ActionListener actionListener = new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					installBean(bean);
				}
			};

			menuItem.addActionListener(actionListener);
		}

		// Menu for the look and feels (lnfs).
		UIManager.LookAndFeelInfo[] lnfs = UIManager.getInstalledLookAndFeels();

		ButtonGroup lnfGroup = new ButtonGroup();
		JMenu lnfMenu = new JMenu("Look&Feel");
		lnfMenu.setMnemonic('L');

		menuBar.add(lnfMenu);

		for (int i = 0; i < lnfs.length; i++) {
			if (!lnfs[i].getName().equals("CDE/Motif")) {
				JRadioButtonMenuItem rbmi = new JRadioButtonMenuItem(
						lnfs[i].getName());
				lnfMenu.add(rbmi);

				// preselect the current Look & feel
				rbmi.setSelected(UIManager.getLookAndFeel().getName()
						.equals(lnfs[i].getName()));

				// store lool & feel info as client property
				rbmi.putClientProperty("lnf name", lnfs[i]);

				// create and add the item listener
				rbmi.addItemListener(
				// inlining
				new ItemListener() {
					public void itemStateChanged(ItemEvent ie) {
						JRadioButtonMenuItem rbmi2 = (JRadioButtonMenuItem) ie
								.getSource();

						if (rbmi2.isSelected()) {
							// get the stored look & feel info
							UIManager.LookAndFeelInfo info = (UIManager.LookAndFeelInfo) rbmi2
									.getClientProperty("lnf name");

							try {
								menuBar.putClientProperty(
										"jgoodies.headerStyle", "Both");
								UIManager.setLookAndFeel(info.getClassName());

								// update the complete application's
								// look & feel
								SwingUtilities
										.updateComponentTreeUI(JCalendarDemo.this);
								for (int i = 0; i < beans.length; i++) {
									SwingUtilities
											.updateComponentTreeUI(beans[i]);
								}
								// set the split pane devider border to
								// null
								BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane
										.getUI()).getDivider();

								if (divider != null) {
									divider.setBorder(null);
								}
							} catch (Exception e) {
								e.printStackTrace();

								System.err.println("Unable to set UI "
										+ e.getMessage());
							}
						}
					}
				});
				lnfGroup.add(rbmi);
			}
		}

		// the help menu
		JMenu helpMenu = new JMenu("Help");
		helpMenu.setMnemonic('H');

		JMenuItem aboutItem = helpMenu.add(new AboutAction(this));
		aboutItem.setMnemonic('A');
		aboutItem.setAccelerator(KeyStroke.getKeyStroke('A',
				java.awt.Event.CTRL_MASK));

		menuBar.add(helpMenu);

		return menuBar;
	}