if (mode == ScreenHandler.FULL_SCREEN) hide();
    private void startGame() {	jProgressBar1.setVisible(true);	setNextEnabled(false);	LauncherPanel1 lp = (LauncherPanel1) wizardPages[0];	MapSelectionPanel msp = (MapSelectionPanel) wizardPages[1];	ClientOptionsJPanel cop = (ClientOptionsJPanel) wizardPages[2];	ServerStatusPanel ssp = (ServerStatusPanel) wizardPages[3];	boolean recover = false;	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);		} else {		    sci = gs.getSavedGame(this, 0, msp.getLoadFilename());		}		sci.setTargetTicksPerSecond(GAME_SPEED_SLOW);  //Set initial game speed to slow.		mode = cop.isWindowed() ? ScreenHandler.WINDOWED_MODE :		    ScreenHandler.FULL_SCREEN;		try {		    p = getPlayer(cop.getPlayerName());		    gc = new GUIClient(sci, sci.getLocalConnection(), mode,			    cop.getDisplayMode(), Resources.get			    ("Railz Client"), this, p);		} catch (IOException e) {		    setInfoText(e.getMessage());		    recover = true;		} catch (GeneralSecurityException e) {		    setInfoText(e.getMessage());		    recover = true;		} 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());		} else {		    sci = gs.getSavedGame(this, lp.getServerPort(),			    msp.getLoadFilename());		}		mode = cop.isWindowed() ? ScreenHandler.WINDOWED_MODE :		    ScreenHandler.FULL_SCREEN;		try {		    p = getPlayer(cop.getPlayerName());		    gc = new GUIClient(sci, sci.getLocalConnection(), mode,			    cop.getDisplayMode(), Resources.get			    ("Railz Client"), this, p);		} catch (IOException e) {		    recover = true;		    setInfoText(e.getMessage());		} catch (GeneralSecurityException e) {		    recover = true;		    setInfoText(e.getMessage());		} finally {		    if (recover) {			sci.quitGame();			cop.setControlsEnabled(true);			prevButton.setEnabled(true);			setNextEnabled(true);			return;		    }		}		ssp.setTableModel(sci.getClientConnectionTableModel());		/* show the connection status screen */		currentPage = 3;		cl.show(jPanel1, "3");		setNextEnabled(false);		break;	    case LauncherPanel1.MODE_JOIN_NETWORK_GAME:		mode = cop.isWindowed() ? ScreenHandler.WINDOWED_MODE :		    ScreenHandler.FULL_SCREEN;		try {		    p = getPlayer(cop.getPlayerName());		    gc = new			GUIClient(lp.getRemoteServerAddress().getAddress(),				mode, cop.getDisplayMode(), Resources.get				("Railz Client"), this, p);		} catch (IOException e) {		    setInfoText(e.getMessage());		    recover = true;		} catch (GeneralSecurityException e) {		    setInfoText(e.getMessage());		    recover = true;		} 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());		} else {		    sci = gs.getSavedGame(this, lp.getServerPort(),			    msp.getLoadFilename());		}		ssp.setTableModel(sci.getClientConnectionTableModel());		nextIsStart = true;		setNextEnabled(true);		currentPage = 3;		cl.show(jPanel1, "3");		/* TODO start server! */	}    }