@Override
    public void onConnect() {
        MessagesTextArea.append("done!\n");        
        enableNewMessages();
        
        String nickname = JOptionPane.showInputDialog(null, "Nickname", null, WIDTH);
        if (!nickname.isEmpty()) {
            chat.join(nickname);
            MessagesTextArea.append("You joined as " + nickname + "\n");
        }
    }
@param args the command line arguments
examples/chat/ChatFrame.java