資源簡介
聊天 socket通信
聊天 socket通信
聊天 socket通信
聊天 socket通信

代碼片段和文件信息
package?client;
import?java.awt.*;
import?java.awt.event.*;
import?javax.swing.*;
import?com.borland.jbcl.layout.*;
import?javax.swing.border.*;
import?java.io.*;
import?java.net.*;
import?java.util.*;
import?java.lang.Thread;
import?java.awt.List.*;
import?java.sql.*;
public?class?frame1?extends?Jframe?{
????//定義數據流和網絡變量
??Socket?socket=null;??//定義連接套接字
??PrintWriter?ps;??//定義打印流
??Listen?listen=null;??//定義客戶端線程
??static?Vector?clientsup=new?Vector(20);//用Vector向量數組存儲上線好友
??static?Vector?clientsdown=new?Vector(20);//用Vector向量數組存儲離線好友
??static?Vector?clients=new?Vector(20);//用Vector向量數組存儲所有好友
??static?Connection?con;
??static?Statement?sql;?//聲明Statement對象
??static?ResultSet?rs;
??public?String?fileIP;
??long?filelen;
??String?filename12;
??private?JPanel?contentPane;
??private?XYLayout?xYLayout1?=?new?XYLayout();
??private?JPanel?jPanel1?=?new?JPanel();
??private?XYLayout?xYLayout2?=?new?XYLayout();
??private?JLabel?jLabel1?=?new?JLabel();
??private?JLabel?jLabel2?=?new?JLabel();
??private?JTextField?jTextField1?=?new?JTextField();
??private?JButton?jButton1?=?new?JButton();
??private?JPanel?jPanel2?=?new?JPanel();
??private?XYLayout?xYLayout3?=?new?XYLayout();
??private?JScrollPane?jScrollPane1?=?new?JScrollPane();
??private?Border?border1;
??private?titledBorder?titledBorder1;
??private?JPanel?jPanel3?=?new?JPanel();
??private?XYLayout?xYLayout4?=?new?XYLayout();
??private?JScrollPane?jScrollPane2?=?new?JScrollPane();
??private?JTextArea?jTextArea1?=?new?JTextArea();
??private?Border?border2;
??private?titledBorder?titledBorder2;
??private?JPanel?jPanel4?=?new?JPanel();
??private?XYLayout?xYLayout5?=?new?XYLayout();
??private?JTextField?jTextField3?=?new?JTextField();
??private?JButton?jButton3?=?new?JButton();
??private?JButton?jButton4?=?new?JButton();
??private?java.awt.List?list1?=?new?java.awt.List();
??private?JLabel?jLabel3?=?new?JLabel();
??private?JTextField?jTextField4?=?new?JTextField();
??private?JPasswordField?jPasswordField1?=?new?JPasswordField();
??private?JButton?jButton5?=?new?JButton();
??private?JPanel?jPanel5?=?new?JPanel();
??private?JButton?jButton6?=?new?JButton();
??private?XYLayout?xYLayout6?=?new?XYLayout();
??private?Border?border3;
??private?JTextField?jTextField2?=?new?JTextField();
??private?JButton?jButton7?=?new?JButton();
??private?JTextField?jTextField5?=?new?JTextField();
??private?JPanel?jPanel6?=?new?JPanel();
??private?Border?border4;
??private?titledBorder?titledBorder3;
??private?Border?border5;
??private?titledBorder?titledBorder4;
??private?XYLayout?xYLayout7?=?new?XYLayout();
??private?JPanel?jPanel7?=?new?JPanel();
??private?Border?border6;
??private?titledBorder?titledBorder5;
??private?XYLayout?xYLayout8?=?new?XYLayout();
??private?JButton?jButton8?=?new?JButton();
??private?JButton?jButton9?=?new?JButton();
??private?JLabel?jLabel4?=?new?JLabel();
??private?JProgressBar?jProgressBar1;
??private?JProgressBar?jProgressBar2;
??long?len=0;
??private?Border?border7;
??private?titledBorder?titledBor
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????2008519??2011-05-12?23:00??JAVA\聊天2011\Chatserver\Chatserver-linux
?????文件????2019103??2011-05-12?23:00??JAVA\聊天2011\Chatserver\Chatserver-mac
?????文件????2023035??2011-05-12?23:00??JAVA\聊天2011\Chatserver\Chatserver-solaris
?????文件????2019607??2011-05-12?23:00??JAVA\聊天2011\Chatserver\Chatserver.exe
?????文件????1939189??2011-05-12?23:00??JAVA\聊天2011\Chatserver\Chatserver.jar
?????文件???????3726??2011-05-12?20:49??JAVA\聊天2011\Chatserver\Chatserver.jpx
?????文件??????????0??2011-05-12?20:05??JAVA\聊天2011\Chatserver\Chatserver.jpx~
?????文件????2023191??2011-05-12?23:00??JAVA\聊天2011\Chatserver\ChatserverW.exe
?????文件?????270336??2011-05-12?23:34??JAVA\聊天2011\Chatserver\password.mdb
?????文件?????270336??2011-05-12?23:30??JAVA\聊天2011\Client\chatLogs.mdb
?????文件????2023021??2011-05-12?23:15??JAVA\聊天2011\Client\Client-linux
?????文件????2033605??2011-05-12?23:15??JAVA\聊天2011\Client\Client-mac
?????文件????2037537??2011-05-12?23:15??JAVA\聊天2011\Client\Client-solaris
?????文件????2034109??2011-05-12?23:15??JAVA\聊天2011\Client\Client.exe
?????文件????1953695??2011-05-12?23:15??JAVA\聊天2011\Client\Client.jar
?????文件????1953556??2011-05-12?23:00??JAVA\聊天2011\Client\Client.jar~
?????文件???????3781??2011-05-12?22:35??JAVA\聊天2011\Client\Client.jpx
?????文件???????1919??2011-05-13?08:42??JAVA\聊天2011\Client\Client.jpx.local
?????文件???????1491??2011-05-12?20:56??JAVA\聊天2011\Client\Client.jpx.local~
?????文件??????????0??2011-05-12?20:56??JAVA\聊天2011\Client\Client.jpx~
?????文件????2037693??2011-05-12?23:15??JAVA\聊天2011\Client\ClientW.exe
?????文件??????27404??2011-05-12?23:15??JAVA\聊天2011\Client\src\client\fr
?????目錄??????????0??2011-08-19?10:08??JAVA\聊天2011\Client\bak\client
?????目錄??????????0??2011-11-11?22:44??JAVA\聊天2011\Client\src\client
?????目錄??????????0??2011-08-19?10:08??JAVA\聊天2011\Chatserver\bak
?????目錄??????????0??2011-08-19?10:08??JAVA\聊天2011\Chatserver\src
?????目錄??????????0??2011-11-11?22:44??JAVA\聊天2011\Client\bak
?????目錄??????????0??2011-08-19?10:08??JAVA\聊天2011\Client\classes
?????目錄??????????0??2011-11-11?22:44??JAVA\聊天2011\Client\src
?????目錄??????????0??2011-11-11?22:44??JAVA\聊天2011\Chatserver
............此處省略6個文件信息
評論
共有 條評論