华北电力大学教学用-10-网络编程概要.pptVIP

  • 1
  • 0
  • 约1.96万字
  • 约 71页
  • 2017-06-18 发布于湖北
  • 举报

华北电力大学教学用-10-网络编程概要.ppt

华北电力大学教学用-10-网络编程概要

public void actionPerformed(ActionEvent e) { try { String str=tf.getText( ); byte[ ] buf=str.getBytes( ); tf.setText(null); out.write(buf);//发送服务器说的话 ta.append(我说:+str); ta.append(\n); } catch(IOException ioe) { } } public static void main(String args[ ]) { new chatServer( ); } } import java.io.*; import java.awt.*; import java.awt.event.*; import .*; public class chatClient extends Frame implements ActionListener { Label label=new Label(聊天); Panel panel=new Panel( ); Text

文档评论(0)

1亿VIP精品文档

相关文档