我编写了个聊天的窗口 窗口代码便宜通过了 但是在运行的时候却一直没反映 哪个大哥帮我解决下import java.awt.*;import java.awt.event.*;
public class Client extends Frame
{
public void Client()
{
TextField text=new TextField();
TextArea teext=new TextArea();
this.setLocation(300, 200);
this.setSize(244, 366);
this.setResizable(false);
this.setBackground(Color.white);
this.add(text,BorderLayout.SOUTH);
this.add(teext,BorderLayout.NORTH);
this.pack();
this.setVisible(true);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
}
public static void main(String args[])
{
Client c=new Client();c.pack();
}
}
public class Client extends Frame
{
public void Client()
{
TextField text=new TextField();
TextArea teext=new TextArea();
this.setLocation(300, 200);
this.setSize(244, 366);
this.setResizable(false);
this.setBackground(Color.white);
this.add(text,BorderLayout.SOUTH);
this.add(teext,BorderLayout.NORTH);
this.pack();
this.setVisible(true);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
}
public static void main(String args[])
{
Client c=new Client();c.pack();
}
}
楼主【zhaomaoyu】截止到2008-07-18 14:45:37的历史汇总数据(不包括此帖):
发帖的总数量:3 发帖的总分数:30 每贴平均分数:10
回帖的总数量:3 得分贴总数量:0 回帖的得分率:0%
结贴的总数量:3 结贴的总分数:30
无满意结贴数:0 无满意结贴分:0
未结的帖子数:0 未结的总分数:0
结贴的百分比:100.00% 结分的百分比:100.00%
无满意结贴率:0.00 % 无满意结分率:0.00 %
敬礼!