[Java] 聊天室 →→→→→进入此内容的聊天室

来自 , 2019-10-02, 写在 Java, 查看 120 次.
URL http://www.code666.cn/view/495dabfd
  1. package org.crazyit.gamehall.chatroom.client.action;
  2.  
  3. import org.crazyit.gamehall.chatroom.client.ClientContext;
  4. import org.crazyit.gamehall.chatroom.client.ui.MainFrame;
  5. import org.crazyit.gamehall.commons.ClientAction;
  6. import org.crazyit.gamehall.commons.Response;
  7.  
  8. /**
  9.  * 接收聊天内容的Action
  10.  *
  11.  * @author yangenxiong yangenxiong2009@gmail.com
  12.  * @version  1.0
  13.  * <br/>网站: <a href="http://www.crazyit.org">疯狂Java联盟</a>
  14.  * <br>Copyright (C), 2009-2010, yangenxiong
  15.  * <br>This program is protected by copyright laws.
  16.  */
  17. public class ReceiveMessageAction implements ClientAction {
  18.  
  19.         public void execute(Response response) {
  20.                 String content = (String)response.getData("content");
  21.                 String senderName = (String)response.getData("senderName");
  22.                 MainFrame mainFrame = ClientContext.mainFrame;
  23.                 mainFrame.appendContent(senderName + " 对你说: " + content);
  24.         }
  25.  
  26. }

回复 "聊天室"

这儿你可以回复上面这条便签

captcha