fireCancel = createMenuItem(menu, "Cancel", FiringDisplay.FIRE_CANCEL);
fireCancel = createMenuItem(menu, "Cancel", FiringDisplay.FIRE_CANCEL, KeyEvent.VK_ESCAPE);
    public CommonMenuBar() {        Menu menu = null;        Menu submenu = null;        MenuItem item = null;        // *** Create the File menu.        menu = new Menu( "File" );        this.add( menu );        // Create the Game sub-menu.        submenu = new Menu( "Game" );        menu.add( submenu );        fileGameNew = new MenuItem( "New" );        fileGameNew.addActionListener( this );        fileGameNew.setActionCommand( "fileGameNew" );        submenu.add( fileGameNew );        fileGameOpen = new MenuItem( "Open..." );        fileGameOpen.addActionListener( this );        fileGameOpen.setActionCommand( "fileGameOpen" );        submenu.add( fileGameOpen );        fileGameSave = new MenuItem( "Save..." );        fileGameSave.addActionListener( this );        fileGameSave.setActionCommand( "fileGameSave" );        submenu.add( fileGameSave );        submenu.addSeparator();        fileGameScenario = new MenuItem( "Open Scenario..." );        fileGameScenario.addActionListener( this );        fileGameScenario.setActionCommand( "fileGameScenario" );        submenu.add( fileGameScenario );        submenu.addSeparator();        fileGameConnectBot = new MenuItem( "Connect as Bot..." );        fileGameConnectBot.addActionListener( this );        fileGameConnectBot.setActionCommand( "fileGameConnectBot" );        submenu.add( fileGameConnectBot );        fileGameConnect = new MenuItem( "Connect..." );        fileGameConnect.addActionListener( this );        fileGameConnect.setActionCommand( "fileGameConnect" );        submenu.add( fileGameConnect );        // Create the Board sub-menu.        submenu = new Menu( "Board" );        menu.add( submenu );        fileBoardNew = new MenuItem( "New" );        fileBoardNew.addActionListener( this );        fileBoardNew.setActionCommand( "fileBoardNew" );        submenu.add( fileBoardNew );        fileBoardOpen = new MenuItem( "Open..." );        fileBoardOpen.addActionListener( this );        fileBoardOpen.setActionCommand( "fileBoardOpen" );        submenu.add( fileBoardOpen );        fileBoardSave = new MenuItem( "Save..." );        fileBoardSave.addActionListener( this );        fileBoardSave.setActionCommand( "fileBoardSave" );        submenu.add( fileBoardSave );        fileBoardSaveAs = new MenuItem( "Save As..." );        fileBoardSaveAs.addActionListener( this );        fileBoardSaveAs.setActionCommand( "fileBoardSaveAs" );        submenu.add( fileBoardSaveAs );        // Create the Unit List sub-menu.        submenu = new Menu( "Unit List" );        menu.add( submenu );        fileUnitsOpen = new MenuItem( "Open..." );        fileUnitsOpen.addActionListener( this );        fileUnitsOpen.setActionCommand( "fileUnitsOpen" );        submenu.add( fileUnitsOpen );        fileUnitsClear = new MenuItem( "Clear" );        fileUnitsClear.addActionListener( this );        fileUnitsClear.setActionCommand( "fileUnitsClear" );        submenu.add( fileUnitsClear );        fileUnitsSave = new MenuItem( "Save..." );        fileUnitsSave.addActionListener( this );        fileUnitsSave.setActionCommand( "fileUnitsSave" );        submenu.add( fileUnitsSave );        // Finish off the File menu.        filePrint = new MenuItem( "Print" );        filePrint.addActionListener( this );        filePrint.setActionCommand( "filePrint" );        filePrint.setEnabled( false );        menu.addSeparator();        menu.add( filePrint );        // *** Create the view menu.        menu = new Menu( "View" );        this.add( menu );        viewMekDisplay = new MenuItem( "Mek Display" );        viewMekDisplay.addActionListener( this );        viewMekDisplay.setActionCommand(Client.VIEW_MEK_DISPLAY);        viewMekDisplay.setShortcut(new MenuShortcut(KeyEvent.VK_D));        menu.add( viewMekDisplay );        viewMiniMap = new MenuItem( "Mini Map" );        viewMiniMap.addActionListener( this );        viewMiniMap.setActionCommand(Client.VIEW_MINI_MAP);        viewMiniMap.setShortcut(new MenuShortcut(KeyEvent.VK_M));        menu.add( viewMiniMap );        viewUnitOverview = new MenuItem( "Unit Overview" );        viewUnitOverview.addActionListener( this );        viewUnitOverview.setActionCommand(Client.VIEW_UNIT_OVERVIEW);        viewUnitOverview.setShortcut(new MenuShortcut(KeyEvent.VK_U));        menu.add( viewUnitOverview );        menu.addSeparator();        viewTurnReport = new MenuItem( "Turn Report" );        viewTurnReport.addActionListener( this );        viewTurnReport.setActionCommand( "viewTurnReport" );        menu.add( viewTurnReport );        viewInitiativeReport = new MenuItem( "Initiative Report" );        viewInitiativeReport.addActionListener( this );        viewInitiativeReport.setActionCommand( "viewInitiativeReport" );        menu.add( viewInitiativeReport );        menu.addSeparator();        viewGameOptions = new MenuItem( "Game Options" );        viewGameOptions.setActionCommand( "viewGameOptions" );        viewGameOptions.addActionListener( this );        menu.add( viewGameOptions );        viewClientSettings = new MenuItem( "Client Settings" );        viewClientSettings.setActionCommand( "viewClientSettings" );        viewClientSettings.addActionListener( this );        menu.add( viewClientSettings );        viewLOSSetting = new MenuItem( "LOS Setting" );        viewLOSSetting.addActionListener( this );        viewLOSSetting.setActionCommand(Client.VIEW_LOS_SETTING);        viewLOSSetting.setShortcut(new MenuShortcut(KeyEvent.VK_L));        menu.add( viewLOSSetting );        menu.addSeparator();        viewPlayerList = new MenuItem( "Player List" );        viewPlayerList.setActionCommand( "viewPlayerList" );        viewPlayerList.addActionListener( this );        menu.add( viewPlayerList );        // *** Create the deployo menu.        menu = new Menu( "Deploy" );        this.add( menu );        // Create the Mines sub-menu.        submenu = new Menu( "Mines" );        deployMinesConventional = createMenuItem(submenu, "Conventional", DeployMinefieldDisplay.DEPLOY_MINE_CONV);        deployMinesCommand = createMenuItem(submenu, "Command", DeployMinefieldDisplay.DEPLOY_MINE_COM);        deployMinesVibrabomb = createMenuItem(submenu, "Vibrabomb", DeployMinefieldDisplay.DEPLOY_MINE_VIBRA);        // Finish off the deploy menu.        deployNext = createMenuItem(menu, "Next Unit", DeploymentDisplay.DEPLOY_NEXT, KeyEvent.VK_N);        deployTurn = createMenuItem(menu, "Turn", DeploymentDisplay.DEPLOY_TURN);        deployLoad = createMenuItem(menu, "Load", DeploymentDisplay.DEPLOY_LOAD);        deployUnload = createMenuItem(menu, "Unload", DeploymentDisplay.DEPLOY_UNLOAD);        menu.addSeparator();                menu.add( submenu );                // *** Create the move menu.        menu = new Menu( "Move" );        this.add( menu );        moveWalk = createMenuItem(menu, "Walk", MovementDisplay.MOVE_WALK, KeyEvent.VK_W);        moveJump = createMenuItem(menu, "Jump", MovementDisplay.MOVE_JUMP, KeyEvent.VK_J);        moveBackUp = createMenuItem(menu, "Back Up", MovementDisplay.MOVE_BACK_UP);        moveGetUp = createMenuItem(menu, "Get Up", MovementDisplay.MOVE_GET_UP);        moveGoProne = createMenuItem(menu, "Go Prone", MovementDisplay.MOVE_GO_PRONE);        moveTurn = createMenuItem(menu, "Turn", MovementDisplay.MOVE_TURN);        moveNext = createMenuItem(menu, "Next Unit", MovementDisplay.MOVE_NEXT, KeyEvent.VK_N);        // Create the Special sub-menu.        submenu = new Menu( "Special" );        moveLoad = createMenuItem(submenu, "Load", MovementDisplay.MOVE_LOAD);        moveUnload = createMenuItem(submenu, "Unload", MovementDisplay.MOVE_UNLOAD);        submenu.addSeparator();        moveCharge = createMenuItem(submenu, "Charge", MovementDisplay.MOVE_CHARGE);        moveDFA = createMenuItem(submenu, "Death From Above", MovementDisplay.MOVE_DFA);                        submenu.addSeparator();        moveFlee = createMenuItem(submenu, "Flee", MovementDisplay.MOVE_FLEE);        moveEject = createMenuItem(submenu, "Eject", MovementDisplay.MOVE_EJECT);        submenu.addSeparator();        moveUnjam = createMenuItem(submenu, "Unjam RAC", MovementDisplay.MOVE_UNJAM);        moveClear = createMenuItem(submenu, "Clear Minefield", MovementDisplay.MOVE_CLEAR);        menu.addSeparator();        menu.add( submenu );        // *** Create the fire menu.        menu = new Menu( "Fire" );        this.add( menu );        fireFire = createMenuItem(menu, "Fire", FiringDisplay.FIRE_FIRE, KeyEvent.VK_F);        fireSkip = createMenuItem(menu, "Skip", FiringDisplay.FIRE_SKIP, KeyEvent.VK_S);        fireNextTarg = createMenuItem(menu, "Next Target", FiringDisplay.FIRE_NEXT_TARG, KeyEvent.VK_T);        fireNext = createMenuItem(menu, "Next Unit", FiringDisplay.FIRE_NEXT, KeyEvent.VK_N);        menu.addSeparator();		fireTwist = createMenuItem(menu, "Twist", FiringDisplay.FIRE_TWIST);		fireFlipArms = createMenuItem(menu, "Flip Arms", FiringDisplay.FIRE_TWIST);        menu.addSeparator();		fireMode = createMenuItem(menu, "Mode", FiringDisplay.FIRE_MODE, KeyEvent.VK_O);        menu.addSeparator();		fireFindClub = createMenuItem(menu, "Find Club", FiringDisplay.FIRE_FIND_CLUB);		fireSpot = createMenuItem(menu, "Spot", FiringDisplay.FIRE_SPOT);        menu.addSeparator();		fireCancel = createMenuItem(menu, "Cancel", FiringDisplay.FIRE_CANCEL);        // *** Create the physical menu.        menu = new Menu( "Physical" );        this.add( menu );        physicalPunch = createMenuItem(menu, "Punch", PhysicalDisplay.PHYSICAL_PUNCH);        physicalKick = createMenuItem(menu, "Kick", PhysicalDisplay.PHYSICAL_KICK);        physicalPush = createMenuItem(menu, "Push", PhysicalDisplay.PHYSICAL_PUSH);        physicalClub = createMenuItem(menu, "Club", PhysicalDisplay.PHYSICAL_CLUB);        physicalBrushOff = createMenuItem(menu, "Brush Off", PhysicalDisplay.PHYSICAL_BRUSH_OFF);        physicalThrash = createMenuItem(menu, "Thrash", PhysicalDisplay.PHYSICAL_THRASH);        physicalDodge = createMenuItem(menu, "Dodge", PhysicalDisplay.PHYSICAL_DODGE);        physicalNext = createMenuItem(menu, "Next Unit", PhysicalDisplay.PHYSICAL_NEXT, KeyEvent.VK_N);        // *** Create the help menu.        menu = new Menu( "Help" );        this.setHelpMenu( menu );        item = new MenuItem( "Contents" );        item.addActionListener( this );        item.setActionCommand( "helpContents" );        menu.add( item );        menu.addSeparator();        item = new MenuItem( "About MegaMek" );;        item.setActionCommand( "helpAbout" );        item.addActionListener( this );        menu.add( item );        // Now manage the menu items.        manageMenu();    }