public final void initUI() {

		JMenuBar menubar = new JMenuBar();

		JMenu file = new JMenu("File");
		file.setMnemonic(KeyEvent.VK_F);

		JMenu view = new JMenu("View");
		view.setMnemonic(KeyEvent.VK_V);

		JCheckBoxMenuItem sbar = new JCheckBoxMenuItem("Show StatuBar");
		sbar.setState(true);

		sbar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent event) {
				if (statusbar.isVisible()) {
					statusbar.setVisible(false);
				} else {
					statusbar.setVisible(true);
				}
			}
		});

		view.add(sbar);

		menubar.add(file);
		menubar.add(view);

		setJMenuBar(menubar);

		statusbar = new JLabel(" Statusbar");
		statusbar.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));
		add(statusbar, BorderLayout.SOUTH);

		setTitle("JCheckBoxMenuItem");
		setSize(360, 250);
		setLocationRelativeTo(null);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
	}