public synchronized void actionFailed(Action action) {
            if(action instanceof ConnectAction) {
                ConnectAction connectAction = (ConnectAction) action;

                if(connectAction.getError() != null) {
                    info("Kon niet verbinden met " + connectAction.getHostnamePort() + ": " + connectAction.getError());
                } else {
                    info("Kon niet verbinden met " + connectAction.getHostnamePort());
                }

                SwingUtilities.invokeLater(new Runnable() {
                    @Override
                    public void run() {
                        connectPanel.getController().enable();
                    }
                });
            } else if(action instanceof CreateGameAction) {
                info("Kon geen spel maken");

                SwingUtilities.invokeLater(new Runnable() {
                    @Override
                    public void run() {
                        gameListPanel.getController().enable();
                    }
                });
            } else if(action instanceof JoinGameAction) {
                info("Je kunt niet meedoen met dit spel");

                SwingUtilities.invokeLater(new Runnable() {
                    @Override
                    public void run() {
                        gameListPanel.getController().enable();
                    }
                });
            } else if(action instanceof WaitForStartAction) {
                if(currentServer != null) {
                    SwingUtilities.invokeLater(new Runnable() {
                        @Override
                        public void run() {
                            info("Het spel werd voortijdig afgebroken door de server");
                            gameListPanel.getController().updateGames(games.values());
                            switchTo(gameListPanel);
                            waitPanel.getController().enable();
                        }
                    });
                }
            } else if(action instanceof WaitForGameEventAction) {
                if(currentServer != null) {
                    SwingUtilities.invokeLater(new Runnable() {
                        @Override
                        public void run() {
                            info("Het spel werd afgebroken door de server");
                            switchTo(connectPanel);
                        }
                    });
                }
            } else if(action instanceof DisconnectAction) {
                SwingUtilities.invokeLater(new Runnable() {
                    @Override
                    public void run() {
                        currentServer = null;
                        currentPlayers = null;
                        currentGame = null;
                        currentGameBoard = null;
                        currentUser = null;
                        games.clear();
                        gameListPanel.getChatPanel().getController().clear();
                        waitPanel.getChatPanel().getController().clear();
                        gamePanel.getChatPanel().getController().clear();
                        switchTo(connectPanel);
                    }
                });
            }
        }