@Override
    public void update(GlobalEvent e) {
        switch(e.getType()) {
            case CLIENT_CONNECTED:
                connected = Boolean.TRUE;
                enableMessageSend();
                clientStatusTextField.setText("Connected: "+ (String)e.getData());
                break;
            case CLIENT_DISCONNECTED:
                connected = Boolean.FALSE;
                disableMessageSend();
                clientStatusTextField.setText("Disconnected: "+ (String)e.getData());
                break;
            case SERVER_CONNECTED:
                serverStatusTextField.setText("Connected: "+ (String)e.getData());
                break;
            case SERVER_DISCONNECTED:
                serverStatusTextField.setText("Disconnected: "+ (String)e.getData());
                break;
            case SERVER_STARTED:
                serverStatusTextField.setText("Started");
                break;
            case SERVER_STOPPED:
                serverStatusTextField.setText("Stopped");
                break;
            case TCP_RECV:
                logRecvMsg((Message)e.getData());
                break;
            case TCP_SEND:
                logSendMsg((Message)e.getData());
                break;
        }
    }