checkBox = new JCheckBoxMenuItem("Show grid");
checkBox = new JCheckBoxMenuItem("Show Grid");
	public JMenuBar createMenuBar() {		MenuListener menuListener = new MenuListener();		JMenuBar menuBar = new JMenuBar();		ButtonGroup group = new ButtonGroup();		JCheckBoxMenuItem checkBox;		JRadioButtonMenuItem radioButton;		JMenu menu;		menu = new JMenu("File");		menu.add(EbHackModule.createJMenuItem("Save Changes", 's', null,				MenuListener.SAVE, menuListener));		menu.add(EbHackModule.createJMenuItem("Exit", 'x', null,				MenuListener.EXIT, menuListener));		menuBar.add(menu);		menu = new JMenu("Edit");		copySector = EbHackModule.createJMenuItem("Copy Sector", 'c', null,				MenuListener.COPY_SECTOR, menuListener);		menu.add(copySector);		pasteSector = EbHackModule.createJMenuItem("Paste Sector", 'p', null,				MenuListener.PASTE_SECTOR, menuListener);		menu.add(pasteSector);		sectorProps = EbHackModule.createJMenuItem("Edit Sector's Properties",				'r', null, MenuListener.SECTOR_PROPS, menuListener);		menu.add(sectorProps);		menuBar.add(menu);		modeMenu = new JMenu("Mode");		group = new ButtonGroup();		radioButton = new JRadioButtonMenuItem("Map Edit");		radioButton.setSelected(true);		radioButton.setActionCommand(MenuListener.MODE0);		radioButton.addActionListener(menuListener);		group.add(radioButton);		modeMenu.add(radioButton);		radioButton = new JRadioButtonMenuItem("Sprite Edit");		radioButton.setSelected(false);		radioButton.setActionCommand(MenuListener.MODE1);		radioButton.addActionListener(menuListener);		group.add(radioButton);		modeMenu.add(radioButton);		radioButton = new JRadioButtonMenuItem("Door Edit");		radioButton.setSelected(true);		radioButton.setActionCommand(MenuListener.MODE2);		radioButton.addActionListener(menuListener);		group.add(radioButton);		modeMenu.add(radioButton);		radioButton = new JRadioButtonMenuItem("Hotspot Edit");		radioButton.setSelected(true);		radioButton.setActionCommand(MenuListener.MODE6);		radioButton.addActionListener(menuListener);		group.add(radioButton);		modeMenu.add(radioButton);		radioButton = new JRadioButtonMenuItem("Enemy Edit");		radioButton.setSelected(true);		radioButton.setActionCommand(MenuListener.MODE7);		radioButton.addActionListener(menuListener);		group.add(radioButton);		modeMenu.add(radioButton);		menuBar.add(modeMenu);		menu = new JMenu("Tools");		findSprite = EbHackModule.createJMenuItem("Find Sprite Entry", 'f',				null, MenuListener.FIND_SPRITE, menuListener);		menu.add(findSprite);		menu.add(EbHackModule.createJMenuItem("Delete All Sprites", 'd', null,				MenuListener.DEL_ALL_SPRITES, menuListener));		menu.add(EbHackModule.createJMenuItem("Clear Tile Image Cache", 't',				null, MenuListener.RESET_TILE_IMAGES, menuListener));		menu.add(EbHackModule.createJMenuItem("Clear Sprite Image Cache", 's',				null, MenuListener.RESET_SPRITE_IMAGES, menuListener));		menu.add(EbHackModule.createJMenuItem("Reload Music Names", 'm', null,				MenuListener.MUSIC_NAMES, menuListener));		menuBar.add(menu);		menu = new JMenu("Options");		checkBox = new JCheckBoxMenuItem("Windows Map Editor 4.x Compatibility");		checkBox.setMnemonic('4');		checkBox.setSelected(oldCompatability);		checkBox.setActionCommand(MenuListener.COMPATABILITY);		checkBox.addActionListener(menuListener);		//menu.add(checkBox); // This feature doesn't work, and NOBODY KNOWS		// WHY :O!!		checkBox = new JCheckBoxMenuItem("Show grid");		checkBox.setMnemonic('g');		checkBox.setSelected(true);		checkBox.setActionCommand(MenuListener.GRIDLINES);		checkBox.addActionListener(menuListener);		menu.add(checkBox);		checkBox = new JCheckBoxMenuItem("Show sprite boxes");		checkBox.setMnemonic('b');		checkBox.setSelected(true);		checkBox.setActionCommand(MenuListener.SPRITEBOXES);		checkBox.addActionListener(menuListener);		menu.add(checkBox);		checkBox = new JCheckBoxMenuItem("Show map changes");		checkBox.setMnemonic('c');		checkBox.setSelected(false);		checkBox.setActionCommand(MenuListener.MAPCHANGES);		checkBox.addActionListener(menuListener);		menu.add(checkBox);		menuBar.add(menu);		menu = new JMenu("Errors");		menu.add(EbHackModule.createJMenuItem("View Sprite Errors", 's', null,				MenuListener.SPRITE_ERR, menuListener));		menu.add(EbHackModule.createJMenuItem("View Door Errors", 'd', null,				MenuListener.DOOR_ERR, menuListener));		menuBar.add(menu);		return menuBar;	}