sectorProps.addActionListener(menuListener); sectorProps.setEnabled(false); menu.add(sectorProps);
    public JMenuBar createMenuBar()    {    	MenuListener menuListener = new MenuListener();        JMenuBar menuBar = new JMenuBar();        ButtonGroup group = new ButtonGroup();        JCheckBoxMenuItem checkBox;        JRadioButtonMenuItem radioButton;                JMenu 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);				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);        menuBar.add(modeMenu);                menu = new JMenu("Tools");        findSprite.addActionListener(menuListener);        findSprite.setEnabled(false);        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));        sectorProps.addActionListener(menuListener);        sectorProps.setEnabled(false);        menu.add(sectorProps);        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;    }