| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 558 人关注过本帖
标题:JAVA聊天室客户服务器连接问题 这里的this 是指向那的?
只看楼主 加入收藏
popperw
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2006-8-16
收藏
 问题点数:0 回复次数:0 
JAVA聊天室客户服务器连接问题 这里的this 是指向那的?


//聊天室主类chatappletthree类
public class chatappletthree extends Applet implements Runnable,ActionListener,ItemListener
{public static final int PORT=1234; //port为网络套接字端口号
static String name,xingbie; //name,xingbie分别为聊天人的name sex
Socket socket;int jilu,enter=0;//jilu为新进入聊天室的人是否与已经有聊天室人员重名的标志
//jilu=0 表明无重名 jilu=1 表明有重名,应该重新输入名字
//enter为进入聊天室的标志, enter=1已经进入聊天室
//enter=0 表明未进入聊天室,发送按钮不起作用的
DataInputStream in; //定义读取服务器信息流in
static DataOutputStream out; //定义写入服务器信息流out
Thread thread;String line; //line 读取来自服务器线路的信息
static Apanel a;static Bpanel b;static Cpanel c;
static Mywindow mywindow; //mywindow为悄悄话窗口
//Applet启动初始化画出聊天室界面,建立与服务器连接
//Applet初始化
public void init()
{mywindow= new Mywindow();
setBackground(new Color(113,163,139));
setLayout(new BorderLayout ());
a=new Apanel();b=new Bpanel();c=new Cpanel();
add("North",a);add("Center",b);add("South",c);
a.button1.addActionListener(this);
a.button2.addActionListener(this);
c.button.addActionListener(this);
c.button2.addActionListener(this);
c.button3.addActionListener(this);
a.box1.addItemListener(this);
a.box2.addItemListener(this);
a.box3.addItemListener(this);
b.b2.list.addActionListener(this);
add("East",new Label());
add("West",new Label());
jilu=0;this.setForeground(Color.black);
c.msg_txt.setBackground(Color.white);
b.chat_txt.setBackground(new Color(200,185,220));
b.chat_txt.setFont(new Font("TimeRoman",Font.PLAIN,12));
}

[此贴子已经被作者于2006-9-28 9:14:05编辑过]

搜索更多相关主题的帖子: JAVA 服务器 聊天室 客户 
2006-09-28 08:17
快速回复:JAVA聊天室客户服务器连接问题 这里的this 是指向那的?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011253 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved