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

  • 大小: 36KB
    文件類(lèi)型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-12
  • 語(yǔ)言: Java
  • 標(biāo)簽: 在線聊天??

資源簡(jiǎn)介

java實(shí)現(xiàn)在線聊天的代碼實(shí)現(xiàn)

資源截圖

代碼片段和文件信息

package?com.lc.chart;

import?java.awt.BorderLayout;
import?java.awt.Color;
import?java.awt.GridLayout;
import?java.awt.Toolkit;
import?java.awt.event.ActionEvent;
import?java.awt.event.ActionListener;
import?java.awt.event.WindowAdapter;
import?java.awt.event.WindowEvent;
import?java.io.BufferedReader;
import?java.io.IOException;
import?java.io.InputStreamReader;
import?java.io.PrintWriter;
import?java.net.Socket;
import?java.util.HashMap;
import?java.util.Map;
import?java.util.StringTokenizer;

import?javax.swing.DefaultListModel;
import?javax.swing.JButton;
import?javax.swing.Jframe;
import?javax.swing.JLabel;
import?javax.swing.JList;
import?javax.swing.JOptionPane;
import?javax.swing.JPanel;
import?javax.swing.JScrollPane;
import?javax.swing.JSplitPane;
import?javax.swing.JTextArea;
import?javax.swing.JTextField;
import?javax.swing.border.titledBorder;

import?com.lc.domain.User;

public?class?Client_more{

????private?Jframe?frame;
????private?JList?userList;
????private?JTextArea?textArea;
????private?JTextField?textField;
????private?JTextField?txt_port;
????private?JTextField?txt_hostIp;
????private?JTextField?txt_name;
????private?JButton?btn_start;
????private?JButton?btn_stop;
????private?JButton?btn_send;
????private?JPanel?northPanel;
????private?JPanel?southPanel;
????private?JScrollPane?rightScroll;
????private?JScrollPane?leftScroll;
????private?JSplitPane?centerSplit;

????private?DefaultListModel?listModel;
????private?boolean?isConnected?=?false;

????private?Socket?socket;
????private?PrintWriter?writer;
????private?BufferedReader?reader;
????private?MessageThread?messageThread;//?負(fù)責(zé)接收消息的線程
????private?Map?onLineUsers?=?new?HashMap();//?所有在線用戶

????//?主方法程序入口
????public?static?void?main(String[]?args)?{
????????new?Client_more();
????}

????//?執(zhí)行發(fā)送
????public?void?send()?{
????????if?(!isConnected)?{
????????????JOptionPane.showMessageDialog(frame?“還沒(méi)有連接服務(wù)器,無(wú)法發(fā)送消息!“?“錯(cuò)誤“
????????????????????JOptionPane.ERROR_MESSAGE);
????????????return;
????????}
????????String?message?=?textField.getText().trim();
????????if?(message?==?null?||?message.equals(““))?{
????????????JOptionPane.showMessageDialog(frame?“消息不能為空!“?“錯(cuò)誤“
????????????????????JOptionPane.ERROR_MESSAGE);
????????????return;
????????}
????????sendMessage(frame.gettitle()?+?“@“?+?“ALL“?+?“@“?+?message);
????????textField.setText(null);
????}

????//?構(gòu)造方法
????public?Client_more()?{
????????textArea?=?new?JTextArea();
????????textArea.setEditable(false);
????????textArea.setForeground(Color.blue);
????????textField?=?new?JTextField();
????????txt_port?=?new?JTextField(“6666“);
????????txt_hostIp?=?new?JTextField(“127.0.0.1“);
????????txt_name?=?new?JTextField(“吳承潛“);
????????btn_start?=?new?JButton(“連接“);
????????btn_stop?=?new?JButton(“斷開(kāi)“);
????????btn_send?=?new?JButton(“發(fā)送“);
????????listModel?=?new?DefaultListModel();
????????userList?=?new

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件????????301??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\.classpath

?????文件????????387??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\.project

?????文件????????598??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\.settings\org.eclipse.jdt.core.prefs

?????文件????????696??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Client_more$1.class

?????文件????????693??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Client_more$2.class

?????文件???????2328??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Client_more$3.class

?????文件???????1498??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Client_more$4.class

?????文件????????830??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Client_more$5.class

?????文件???????3817??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Client_more$MessageThread.class

?????文件???????8147??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Client_more.class

?????文件????????819??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Server_more$1.class

?????文件????????693??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Server_more$2.class

?????文件????????696??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Server_more$3.class

?????文件???????2599??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Server_more$4.class

?????文件???????1856??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Server_more$5.class

?????文件???????4723??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Server_more$ClientThread.class

?????文件???????3163??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Server_more$ServerThread.class

?????文件???????8141??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart\Server_more.class

?????文件????????775??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\domain\User.class

?????文件??????13953??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\src\com\lc\chart\Client_more.java

?????文件??????17725??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\src\com\lc\chart\Server_more.java

?????文件????????534??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\src\com\lc\domain\User.java

?????目錄??????????0??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\chart

?????目錄??????????0??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc\domain

?????目錄??????????0??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\src\com\lc\chart

?????目錄??????????0??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\src\com\lc\domain

?????目錄??????????0??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com\lc

?????目錄??????????0??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\src\com\lc

?????目錄??????????0??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\bin\com

?????目錄??????????0??2016-10-28?10:47??(重點(diǎn))實(shí)現(xiàn)在線聊天javase項(xiàng)目實(shí)現(xiàn)\onlinechart\src\com

............此處省略8個(gè)文件信息

評(píng)論

共有 條評(píng)論