if (chatPane.getLength() == 0) {
return;
}
String msg = chatPane.getText();
//System.err.println(msg);
ClientConnection connection = ChatroomClient.getClient().getConnection();
if (chatPane.isPrivate()) {
connection.sendPrivateMessage(getName(), ChatroomClient.getClient().getUserName(), chatPane.getRecipient(), msg);
} else {
connection.sendGroupMessage(getName(), ChatroomClient.getClient().getUserName(), msg);
}
chatPane.clearAll();
}