文件名称:一个简单的一对一 聊天系统
文件大小:3KB
文件格式:RAR
更新时间:2014-01-27 12:03:32
一个简单的一对一 聊天系统 P2P
//客户端 import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.Socket; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.JScrollPane; public class TalkClient extends JFrame implements ActionListener{ private static final long serialVersionUID = 1L; private JPanel jContentPane = null; private JPanel jPanel = null; private JTextField jTextField = null; private JButton jButton = null; private JTextArea jTextArea = null; private Socket soc = null; private BufferedReader br = null; private BufferedWriter bw = null; private JScrollPane jScrollPane = null;
【文件预览】:
一个简单的一对一聊天系统
----TalkClient.java(5KB)
----TalkServer.java(5KB)