} finally {
} catch (Exception e) { logger.log(Level.SEVERE, "Caught unexpected exception", e); } finally {
    private void startGame() {	jProgressBar1.setVisible(true);	setNextEnabled(false);	LauncherPanel1 lp = (LauncherPanel1) wizardPages[TAB_MAIN_MENU];	MapSelectionPanel msp = (MapSelectionPanel)	    wizardPages[TAB_MAP_SELECTION];	ClientOptionsJPanel cop = (ClientOptionsJPanel)	    wizardPages[TAB_CLIENT_OPTIONS];	ServerStatusPanel ssp = (ServerStatusPanel)	    wizardPages[TAB_CONNECTION_STATUS];	boolean recover = true;	int port, mode;	GameServer gs = new GameServer();	GUIClient gc;	Player p;	CardLayout cl = (CardLayout) jPanel1.getLayout();	switch (lp.getMode()) {	    case LauncherPanel1.MODE_SINGLE_PLAYER:		if (msp.getMapAction() == MapSelectionPanel.START_NEW_MAP) {		    sci = gs.getNewGame(msp.getMapName(), this, 0,			    msp.getScenario());		} else {		    sci = gs.getSavedGame(this, 0, msp.getLoadFilename());		}		//Set initial game speed to paused.		sci.setTargetTicksPerSecond(GAME_SPEED_PAUSED);		mode = cop.isWindowed() ? ScreenHandler.WINDOWED_MODE :		    ScreenHandler.FULL_SCREEN;		try {		    p = getPlayer(cop.getPlayerName());		    /* hide the form whilst the mode is changed  */		    if (mode == ScreenHandler.FULL_SCREEN)			hide();		    gc = new GUIClient(sci, sci.getLocalConnection(), mode,			    cop.getDisplayMode(), Resources.get			    ("Railz Client"), this, p);		    startAIClients(sci);		    recover = false;		} catch (IOException e) {		    setInfoText(e.getMessage());		    logger.log(Level.SEVERE, "Caught IOException:", e);		} catch (GeneralSecurityException e) {		    setInfoText(e.getMessage());		    logger.log(Level.SEVERE, "Caught " +			    "GeneralSecurityException", e);		} finally {		    if (recover) {			sci.quitGame();			cop.setControlsEnabled(true);			prevButton.setEnabled(true);			setNextEnabled(true);			return;		    }		}		hide();		break;	    case LauncherPanel1.MODE_START_NETWORK_GAME:		if (msp.getMapAction() == MapSelectionPanel.START_NEW_MAP) {		    sci = gs.getNewGame(msp.getMapName(), this,			    lp.getServerPort(), msp.getScenario());		} else {		    sci = gs.getSavedGame(this, lp.getServerPort(),			    msp.getLoadFilename());		}		mode = cop.isWindowed() ? ScreenHandler.WINDOWED_MODE :		    ScreenHandler.FULL_SCREEN;		try {		    p = getPlayer(cop.getPlayerName());		    if (mode == ScreenHandler.FULL_SCREEN)			hide();		    gc = new GUIClient(sci, sci.getLocalConnection(), mode,			    cop.getDisplayMode(), Resources.get			    ("Railz Client"), this, p);		    if (mode == ScreenHandler.FULL_SCREEN)			gc.getGUIRoot().getDialogueBoxController().			    createDialog(contentJPanel, Resources.get				    ("Railz Launcher"));		    startAIClients(sci);		    recover = false;		} catch (IOException e) {		    setInfoText(e.getMessage());		    logger.log(Level.SEVERE, "Caught IOException", e);		} catch (GeneralSecurityException e) {		    setInfoText(e.getMessage());		    logger.log(Level.SEVERE, "Caught " + 			    "GeneralSecurityException", e);		} catch (Exception e) {		    logger.log(Level.SEVERE, "Caught " + 			    "Exception", e);		}finally {		    if (recover) {			sci.quitGame();			cop.setControlsEnabled(true);			prevButton.setEnabled(true);			setNextEnabled(true);			return;		    }		}		ssp.setTableModel(sci.getClientConnectionTableModel());		/* show the connection status screen */		currentPage = TAB_CONNECTION_STATUS;		showTab(currentPage);		setNextEnabled(false);		break;	    case LauncherPanel1.MODE_JOIN_NETWORK_GAME:		mode = cop.isWindowed() ? ScreenHandler.WINDOWED_MODE :		    ScreenHandler.FULL_SCREEN;		try {		    p = getPlayer(cop.getPlayerName());		    if (mode == ScreenHandler.FULL_SCREEN)			hide();		    gc = new GUIClient(lp.getRemoteServerAddress(),				mode, cop.getDisplayMode(), Resources.get				("Railz Client"), this, p);		    startAIClients(null);		    recover = false;		} catch (IOException e) {		    setInfoText(e.getMessage());		    logger.log(Level.SEVERE, "Caught IOException", e);		} catch (GeneralSecurityException e) {		    setInfoText(e.getMessage());		    logger.log(Level.SEVERE, "Caught " +			    "GeneralSecurityException", e);		} finally {		    if (recover) {			cop.setControlsEnabled(true);			prevButton.setEnabled(true);			setNextEnabled(true);			return;		    }		}		hide();		break;	    case LauncherPanel1.MODE_SERVER_ONLY:		if (msp.getMapAction() == MapSelectionPanel.START_NEW_MAP) {		    sci = gs.getNewGame(msp.getMapName(), this,			    lp.getServerPort(), msp.getScenario());		} else {		    sci = gs.getSavedGame(this, lp.getServerPort(),			    msp.getLoadFilename());		}		try {		    startAIClients(sci);		    /* TODO additional server control screen including game		     * speed controls */		} catch (IOException e) {		    setInfoText(e.getMessage());		    logger.log(Level.SEVERE, "Caught IOException", e);		    return;		} catch (GeneralSecurityException e) {		    setInfoText(e.getMessage());		    logger.log(Level.SEVERE, "Caught " + 			    "GeneralSecurityException", e);		    return;		}		ssp.setTableModel(sci.getClientConnectionTableModel());		nextIsStart = true;		setNextEnabled(true);		currentPage = TAB_CONNECTION_STATUS;		showTab(currentPage);	}    }