xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 772.48 KB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2024-12-17
  • 語言: Java
  • 標簽:

資源簡介

本聊天室為本人修改創作,并附帶有開發文檔,內含可行性分析、需求分析、詳細設計等,功能完善,界面美觀,適合作為課程設計之用

資源截圖

代碼片段和文件信息


import?java.awt.*;
import?java.awt.event.*;
import?javax.swing.*;
import?javax.swing.event.*;
import?java.io.*;
import?java.net.*;

/***?聊天客戶端的主框架類*/
public?class?ChatClient?extends?Jframe?implements?ActionListener{

String?ip?=?“127.0.0.1“;//連接到服務端的ip地址
int?port?=?8888;//連接到服務端的端口號
String?userName?=?“花好月圓“;//用戶名
int?type?=?0;//0表示未連接,1表示已連接

Image?icon;//程序圖標
JComboBox?combobox;//選擇發送消息的接受者
JTextArea?messageShow;//客戶端的信息顯示
JScrollPane?messageScrollPane;//信息顯示的滾動條

JLabel?expresssendToLabelmessageLabel?;

JTextField?clientMessage;//客戶端消息的發送
JCheckBox?checkbox;//私聊

JButton?clientMessageButton;//發送消息
JTextField?showStatus;//顯示用戶連接狀態

Socket?socket;
objectOutputStream?output;//網絡套接字輸出流
objectInputStream?input;//網絡套接字輸入流

ClientReceive?recvThread;


//建立工具欄
JToolBar?toolBar?=?new?JToolBar();
//建立工具欄中的按鈕組件
JButton?loginButton;//用戶登錄
JButton?logoffButton;//用戶注銷
JButton?userButton;//用戶信息的設置
JButton?connectButton;//連接設置
JButton?exitButton;//退出按鈕

//框架的大小
Dimension?faceSize?=?new?Dimension(400?600);

JPanel?downPanel?;
GridBagLayout?girdBag;
GridBagConstraints?girdBagCon;

public?ChatClient(){
init();//初始化程序

//添加框架的關閉事件處理
this.setDefaultCloseOperation(Jframe.EXIT_ON_CLOSE);
this.pack();
//設置框架的大小
this.setSize(faceSize);

//設置運行時窗口的位置
Dimension?screenSize?=?Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation(?(int)?(screenSize.width?-?faceSize.getWidth())?/?2
?(int)?(screenSize.height?-?faceSize.getHeight())?/?2);
this.setResizable(false);
this.settitle(“客戶端“);?//設置標題

//程序圖標
icon?=?getImage(“icon.gif“);
this.setIconImage(icon);?//設置程序圖標
show();


}

/***?程序初始化函數*/
public?void?init(){

Container?contentPane?=?getContentPane();
contentPane.setLayout(new?BorderLayout());

//添加菜單欄


//初始化按鈕
loginButton?=?new?JButton(“登錄“);
logoffButton?=?new?JButton(“注銷“);
userButton??=?new?JButton(“用戶設置“?);
connectButton??=?new?JButton(“連接設置“?);
exitButton?=?new?JButton(“退出“?);

//將按鈕添加到工具欄
toolBar.add(userButton);
toolBar.add(connectButton);
toolBar.addSeparator();//添加分隔欄
toolBar.add(loginButton);
toolBar.add(logoffButton);
toolBar.addSeparator();//添加分隔欄
toolBar.add(exitButton);
contentPane.add(toolBarBorderLayout.NORTH);

checkbox?=?new?JCheckBox(“私聊“);
checkbox.setSelected(false);



//初始時
loginButton.setEnabled(true);
logoffButton.setEnabled(false);




//添加按鈕的事件偵聽
loginButton.addActionListener(this);
logoffButton.addActionListener(this);
userButton.addActionListener(this);
connectButton.addActionListener(this);
exitButton.addActionListener(this);

combobox?=?new?JComboBox();
combobox.insertItemAt(“所有人“0);
combobox.setSelectedIndex(0);

messageShow?=?new?JTextArea();
messageShow.setEditable(false);
//添加滾動條
messageScrollPane?=?new?JScrollPane(messageShow
JScrol

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????????5??2009-03-25?20:54??第二組\源程序\客戶端\1.bat

?????文件??????10067??2009-04-28?09:13??第二組\源程序\客戶端\ChatClient.java

?????文件???????1744??2006-05-25?20:35??第二組\源程序\客戶端\ClientReceive.java

?????文件???????3517??2006-04-14?00:21??第二組\源程序\客戶端\ConnectConf.java

?????文件???????1005??2009-04-28?06:56??第二組\源程序\客戶端\icon.GIF

?????文件???????2804??2009-04-28?07:00??第二組\源程序\客戶端\UserConf.java

?????文件??????????5??2009-03-25?20:54??第二組\源程序\服務端\1.bat

?????文件??????10002??2009-04-28?08:38??第二組\源程序\服務端\ChatServer.java

?????文件???????1005??2009-04-28?06:56??第二組\源程序\服務端\icon.gif

?????文件????????238??2006-04-11?23:11??第二組\源程序\服務端\Node.java

?????文件???????2842??2006-04-12?00:06??第二組\源程序\服務端\PortConf.java

?????文件???????1572??2006-05-25?19:59??第二組\源程序\服務端\ServerListen.java

?????文件???????3977??2009-04-28?11:25??第二組\源程序\服務端\ServerReceive.java

?????文件???????1409??2009-04-28?07:27??第二組\源程序\服務端\UserlinkList.java

?????文件?????710144??2009-05-22?11:33??第二組\用戶手冊.doc

?????文件?????222720??2009-05-22?11:33??第二組\聊天室程序設計.doc

?????目錄??????????0??2009-05-07?17:32??第二組\源程序\客戶端

?????目錄??????????0??2009-05-07?17:32??第二組\源程序\服務端

?????目錄??????????0??2009-05-07?17:32??第二組\源程序

?????目錄??????????0??2009-05-07?18:27??第二組

-----------?---------??----------?-----??----

???????????????973056????????????????????20


評論

共有 條評論