public void startClient() {
        localPlayer = new Player("O", this.nextMove);
        final Client gameClient = new Client(localPlayer, nextMove, this.whoseTurn);

        gameClient.addGameEventListener(this);
        try {
            gameClient.connect();
            remotePlayer = gameClient.waitForServerPlayer();
            boardModel = gameClient.waitForBoardInfo();
        } catch (IOException ex) {
            JOptionPane.showMessageDialog(this,
                    "Cannot connect to server",
                    "Error",
                    JOptionPane.ERROR_MESSAGE);
            return;
        }

        this.initBoardPanel();

        System.out.format("Server name: %s\nBoard %dx%d\n",
                remotePlayer.getName(),
                boardModel.getHeight(),
                boardModel.getWidth());
        // Maybe we'll wait here a bit before sending the start signal. The other
        // end will have to wait for us.
        
        JOptionPane.showMessageDialog(this,
                "Game started, we go first.",
                null,
                JOptionPane.PLAIN_MESSAGE);
        
        try {
            gameClient.startGame();
        } catch (IOException | InterruptedException ex) {
        } finally {
            JOptionPane.showMessageDialog(this,
                    "Server disconnected",
                    null,
                    JOptionPane.INFORMATION_MESSAGE);
        }
    }