




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領
文檔簡介
1、xxxxxxxxxxxxx 學院網(wǎng)絡工程系網(wǎng)絡應用開發(fā)綜合實踐基于tcp的java及時聊天系統(tǒng)設計報告姓 名: 學 號: 班 級: 指導老師: 完成時間:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx基于tcp的java及時聊天系統(tǒng)摘要tcp/ip網(wǎng)絡體系結(jié)構(gòu)和協(xié)議標準是近年來計算機網(wǎng)絡研究和應用的熱點技術(shù), 以它為基礎組建的internet已成為口前國際上規(guī)模最大的計算機網(wǎng)絡系統(tǒng)。在我 國,tcp/ip也越來越受到廣泛關注,并得以多層次推廣。在tcp/ip的模型屮,傳輸 層有兩個并列的協(xié)議:tcp (transport control protocol,傳
2、輸控制協(xié)議)和udp (user datagram protocol,用戶數(shù)據(jù)報協(xié)議)。tcp和udp共存于一個網(wǎng)絡中,tcp 是而向連接的,提供可靠性服務,udp是無連接的,提供高效率服務。高可靠性的 tcp通常用于一次傳輸要交換大量報文的情形,比如文件傳輸、遠程登錄等;高效率 的udp 般用于一次傳輸交換少量報文,尤其是交易型應用,比如數(shù)據(jù)庫查詢的情形, 其可靠性由應用程序提供,因為交換次數(shù)不多,即便發(fā)生傳輸錯謀,必須重傳,應用程 序也不會為此付出太大的代價。在網(wǎng)絡越來越發(fā)達的今天,人們對網(wǎng)絡的依賴越來越多,越來越離不開網(wǎng)絡, 由此而產(chǎn)生的聊天工具越來越多,網(wǎng)絡聊天時一類的聊天系統(tǒng)的發(fā)展日
3、新月異。本 java及時聊天系統(tǒng)即是一個使用套接字(socket)實現(xiàn)c/s (client and server)模式 的tcp/ip協(xié)議下連接的及時通信系統(tǒng)。本論文主要分為六章:第一章引言,介紹本java及時聊天系統(tǒng)的需求分析, 闡述了項口的開發(fā)背景、系統(tǒng)設計方法,明確了該設計的主要任務。第二章是系統(tǒng) 的概要設計,詳細描述了聊天系統(tǒng)的運行環(huán)境,系統(tǒng)的結(jié)構(gòu)設計以及設計實現(xiàn)的基 本功能。第三章描述了使用myeclipse完成系統(tǒng)架構(gòu)設計,實現(xiàn)簡便切邏輯化的程 序設計。第四章是系統(tǒng)的詳細設計,詳細介紹了系統(tǒng)的結(jié)構(gòu)以及各個功能模塊的設 計細節(jié)。第五章是對本java及時聊天系統(tǒng)的測試結(jié)果報告,主要針
4、對系統(tǒng)各功能 模塊進行細節(jié)測試。最后是本次網(wǎng)絡應用開發(fā)綜合實踐的總結(jié)及體會。關鍵詞:java; tcp/ip; c/s; myeclipse;及時通信abstracttcp/ip network system structure and protocol standards in recent years is to study and application of computer network by its hotspot technologies based internet has become a current internationafs largest computer ne
5、twork system. in our country, the tcp/ip is also more and more attention, and to multi-level promotion. on tcp/ip model, the transport layer has two paratactic agreement: transport control protocol (tcp, tcp and udp (user datagram) protocol, user data reported protocol). tcp and udp coexist in a net
6、work, the tcp is connection-oriented, provide reliability service, udp is no connection, with efficient service high reliability of the tcp normally used for a transmission of messages to exchange the situation, such as file transfer, remote login, etc.; efficient udp general for a transmission mess
7、age, especially for small amounts, such as transactional database query application situation, its reliability by applications provide, because few, even happen exchange frequency transmission error, necessitating retransmission, applications also won't pay the too big price.in network is more a
8、nd more developed today, people depending on the internet, more and more tied to the internet, which produces more chatting tools, online chat chatting system when the development of a day. the java timely chat system is a use socket (socket) to implement c/s (and server) mode are under the tcp/ip p
9、rotocol connect timely communication system.this thesis mainly divided into six chapters: the first chapter preface, introduce the java chat system timely requirement analysis, expounds the development background, system project design methods, clear the design of the main task. the second chapter i
10、s system of general design, describes the detailed chat the operation of the system environment, system design and implementation of structural design and basic function. the third chapter describes myeclipse complete use of system architecture design, realization of simple cut logic programming. th
11、e fourth chapter is system of the detailed design, detailed introduction of system structure and modules design details. the fifth chapter is illustrative of the java timely chat systems test results report, the function module mainly aimed at the system detail test. the last is the network applicat
12、ion development and comprehensive the summary of practice and experiencekeywords: java; tcp/ip; c/s;myeclipse; timely communication摘要2abstract3一. 引言61. 1背景61. 2需求分析6二. 系統(tǒng)設計72.1功能概述72.2運行環(huán)境72.3系統(tǒng)結(jié)構(gòu)8三. 系統(tǒng)架構(gòu)設計83. 1整體設計83.2服務器端設計93.3客戶端設計10四. 詳細設計104.1聊天室服務器端設計104. 1 1 server java104. 1. 2 serverlisten
13、java164. 1. 3 serverreceive. java 174. 1. 4 porconf. java204. 1. 5 node- java224. 1. 6 userlinklist. java224. 1. 7 help, java244.2聊天室客戶端設計244. 2. 1 client- java254- 2. 2 cl ientreceive. java304- 2. 3 connectconf. java314. 2. 4 userconf. java32五. 測試報告345. 1系統(tǒng)界面預覽345.2測試過程345. 2. 1服務器端端口設置及偵聽功能345. 2.
14、 2客戶端連接功能355. 2. 2用戶信息設置功能355. 2. 3用戶登錄/注銷功能365. 2. 4聊天通信功能375. 2. 5幫助服務功能39六總結(jié)及體會40七.參考文獻40一.引言1.1背景在網(wǎng)絡越來越發(fā)達的今天,人們對網(wǎng)絡的依賴越來越多,越來越離不開網(wǎng)絡, 由此而產(chǎn)生的聊天工具越來越多,類似飛鴿等一類的聊天、文件傳送系統(tǒng)的發(fā)展fi新月 異,應20102011學年第二學期網(wǎng)絡應用開發(fā)綜合實踐課程要求,我選擇 制作一個局域網(wǎng)的網(wǎng)絡聊天工具作為本次的綜合實踐課程;以求通過制作該系統(tǒng)能 更好的學習網(wǎng)絡編程及應用開發(fā)。本次選題為“基于tcp的java聊天系統(tǒng)”的口的就是指直接或間接地通過網(wǎng)
15、 絡協(xié)議與其他計算機進行通訊。網(wǎng)絡編程中有兩個主要的問題,一個是如何準確的 定位網(wǎng)絡上一臺或多臺主機,另一個就是找到主機后如何可靠高效的進行數(shù)據(jù)傳 輸。在tcp/ip協(xié)議屮ip層主要負責網(wǎng)絡主機的定位,數(shù)據(jù)傳輸?shù)穆酚?,由ip地 址可以唯一地確定internet上的一臺主機。而tcp層則提供面向應用的可靠的或非 可靠的數(shù)據(jù)傳輸機制,這是網(wǎng)絡編程的主要對象,一般不需要關心ip層是如何處 理數(shù)據(jù)的。目前較為流行的網(wǎng)絡編程模型是客戶機/服務器(c/s)結(jié)構(gòu)。即通信雙 方一方作為服務器等待客戶提出請求并予以響應。客戶則在需要服務時向服務器提 出申請。服務器一般作為守護進程始終運行,監(jiān)聽網(wǎng)絡端口,一旦有客
16、戶請求,就 會啟動一個服務進程來響應該客戶,同時自己繼續(xù)監(jiān)聽服務端口,使后來的客戶也 能及時得到服務。1. 2需求分析本基于tcp的java聊天系統(tǒng)具體目的是通過網(wǎng)絡協(xié)議與其他計算機進行通 訊。主要實現(xiàn)如下需求口的:登錄/注銷、實時聊天、狀態(tài)顯示、幫助操作等。作為當今最流行的及時通信工具,騰訊qq、msn等軟件具有強大的聊天、文件 傳輸、圖片保存、遠程協(xié)助等功能,在日常的生活工作中對人與人z間通信幫助巨 大,在一定程度上甚至已經(jīng)取代傳統(tǒng)的信件通信。本次的網(wǎng)絡應用開發(fā)綜合實踐我 就是以通信中最基本的聊天消息收發(fā)方式設計一個基于tcp的java及時聊天系 統(tǒng),由于能力有限,所以把一些要求較高的功能
17、刪除了,只留卜了聊天這一簡單的通信功能。此簡單及時聊天通信系統(tǒng)通過走陽語言編寫,提供給用戶基本的純文本 消息收發(fā)功能,能夠通過c/s結(jié)構(gòu)實現(xiàn)消息的轉(zhuǎn)發(fā)和接收。系統(tǒng)設計2. 1功能概述本java即時聊天系統(tǒng)是一個基于tcp的、由java語言編寫的典型應用程序, 它運用口前較為流行的網(wǎng)絡編程模型是客戶機/服務器(c/s)結(jié)構(gòu),實現(xiàn)通信雙方 一方作為服務器等待客戶提出請求并予以響應??蛻魟t在需要服務時向服務器提出 申請。服務器一般作為守護進程始終運行,監(jiān)聽網(wǎng)絡端口,一旦有客戶請求,就會 啟動一個服務進程來響應該客戶,同時自己繼續(xù)監(jiān)聽服務端口,使后來的客戶也能 及時得到服務,其系統(tǒng)主要功能概述如下:(
18、1) 登錄/注銷功能:在服務器端啟動服務開始偵聽后,客戶端可以登錄聊天系統(tǒng)進 行及時聊天;或者結(jié)束聊天注銷登錄。(2) 聊天功能:客戶可以通過服務器轉(zhuǎn)發(fā)消息,實現(xiàn)一對一和多對多聊天。(3) 設置功能:客戶端可以在登錄前進行基本信息設置功能。(4) 顯示功能:客戶端程序應該可以實時顯示目前所有客戶端用戶的狀態(tài)。2. 2運行環(huán)境硬件:pc機操作系統(tǒng):windows 2oo3/xp/vista/7 編譯環(huán)境:myeclipse 8.5+tomcat 6.0 開發(fā)工具:myeclipse &5+tomcat 6.0 編程語言:java2. 3系統(tǒng)結(jié)構(gòu)java聊人系統(tǒng)圖2. 3系統(tǒng)結(jié)構(gòu)三.系統(tǒng)架
19、構(gòu)設計3. 1整體設計本java聊天系統(tǒng)在myeclipse 8.5設計時嚴格按照c/s結(jié)構(gòu)設計,客戶端 “client”及服務器端"server"分別實現(xiàn)需求分析小的口的,具體整體設計結(jié)構(gòu)如 下圖所示:了;呂 myjavatalk3. 2服務器端設計圖3.靠務器端設計辛磚srcyclient卜dient.javai clientreceive.java j£| connectconf.java 卜 help.java j userconf.javai卜唱image serveri回 help.java 卜£ node.java 卜屈 portconf.
20、javaserver .java serverlisten.java丄| serverreceive .javaau| userlinklist.javaeft jre system library javase-1.6圖3.1系統(tǒng)整體架構(gòu)設計3.3客戶端設計圖3. 2客戶器端設計u!詳細設計本基于tcp的java及時聊天系統(tǒng)一共包含2個部分:server部分和client部 分,分別實現(xiàn)服務器端功能和客戶端功能。4. 1聊天室服務器端設計聊天室服務端主要包括7個文件,它們的功能如下:4. 1. 1 server, javaserver, java包含名為server的public類,其主要功
21、能為定義服務器端的界 而,添加事件偵聽與事件處理。調(diào)用serverlisten類來實現(xiàn)服務端用戶上線與下 線的偵聽,調(diào)用serverreceive類來實現(xiàn)服務器端的消息的收發(fā)。主要實現(xiàn)方法源 代碼如下:package server;import java.awt*; import javaawtevent*;import javax.swing.*;import javaxswingevent.*; import javanet*;import jmvaio.*;/ *聊天服務端的主框架類*/public class server extends jframe implements actio
22、nlistener public static int port = 8888; /服務端的偵聽端口 serversocket serversocket; /服務端socketimage icon; /程序圖標jcombobox combobox; /選樣發(fā)送消息的接受:者jtextarea messageshow; /服務端的信息顯示 jscrollpane messagescrollpane; /信息顯小的滾動條 jtextfield showstatus; /顯示用八連接狀態(tài) jlabel sendtolabel,messagelabel;jtextfield sysmessage; /
23、服務端消息的發(fā)送 jbutton sysmessagebutton; /服務端消息的發(fā)送按鈕 userlinklist userlinklist; /丿u戶鏈表/建立菜單欄jmenubar jmenubar = new jmenubar();/建立菜單組jmenu servicemenu = new jmenu ( huk(v) n );/建立菜單項jmenuitemjmenuitemjmenuitemjmenuitemportltem = new jmenuitem (”端口設置(p)“); startitem = new jmenuitem (”啟動月艮務(s) ”); stopltem=
24、new jmenuitem ("停止月比務(t)”); exititem=new jmenuitem (”退出(x)”);jmenu helpmenu=new jmenu ("幫助(h)”);jmenuitem helpltem=new jmenuitem (”幫助(h)”);/建立工具欄 jtoolbar toolbar = new jtoolbar();/建立工具欄中的按鈕組件/框架的人小/*服務端構(gòu)造函數(shù)*/public server()j_close);/添加框架的關閉事件處理thissetdefaultcloseoperation(jframeexit_ this
25、pack();/設置框架的大小this.setsize (facesize);/設置運行時窗口的位置this settitle ("聊天室服務端” );/設置標題/ *程序初始化函數(shù)*/public void init () container contentpane = getcontentpane (); contentpanesetlayout(new borderlayout();/添加菜單欄/初始化按鈕/將按鈕添加到丁具欄/初始時,令停止服務按鈕不町用 stopserver.setenabled(false); stopitem setenabled(false);/為菜單
26、欄添加事件監(jiān)聽portitem.addactionlistener(this); start item.addactionlistener(this); stopitem.addactionlistener(this); exititemaddactionlistener(this); helpitem.addactionlistener(this);/添加按鈕的事件偵聽portsetaddactionlistener(this); startserver.addactionlistener(this); stopserveraddactionlistener(this); exitbutto
27、naddactionlistene匚(this);combobox = new jcombobox(); combobox . insert itemat (1所有人,0);comboboxsetselectedlndex(0);messageshow = new jtextarea(); messageshow.seteditable (false);/添加滾動條/添加系統(tǒng)消息的爭件偵聽sysmessage.addactionlistener(this); sysmessagebutton.addactionlistener(this);sendtolabel = new jlmbel (&
28、quot;發(fā)送至:”); messagelabel = new jlabel ("發(fā)送消息:”); downpanel = new jpanel ();girdbag = new gridbaglayout(); downpanelsetlayout (girdbag);girdbagcon = new gridbagconstraints ();jlabel none = new jlabel(ngirdbagcongirdbagcongirdbagcongirdbagcongirdbagcongirdbagconnew gridbagconstraints(); new grid
29、bagconstraints (); new gridbagconstraints(); new gridbagconstraints (); new gridbagconstraints (); new gridbagconstraints ();/關閉程序時的操作thisaddwindowlistener(new windowadapter () public void windowclosing(windowevent e) stopservice();system.exit(0););/*事件處理*/public void actionperformed(actionevent e)
30、object obj = e.getsource();if (obj = startserver | | obj = startitem) /丿動務端 startservice ();else if (ob j = stopserver | | ob j = stopitem) /(止服務端 else if (obj = portset i | obj = portitem) /帶口設'首:/調(diào)出端口設置的対話框portconf portconf = new portconf(this);portconfshow();else if (ob j = exitbutton | | ob
31、j = exit item) /退川i 程序else if (obj = helpitem) /菜單欄中的幫助 /調(diào)出幫助對話框help helpdialog = new help (this);helpdialog s嵌w ();else if (obj = sysmessage | obj = sysmessagebutton) /發(fā)送系統(tǒng)消息sendsystemmessage();/ *啟動服務端*/public void startservice()try serversocket = new serversocket(port,10);message show. append (&q
32、uot;服務端已經(jīng)啟動,在,f+port+n 端口偵聽n,f);uatuh (exception e) /system.outprintin (e);userlinklist = new userlinklist();listenthread = newserverlisten(serversocket,combobox,messageshow,showstatus,userlinklist); listenthread.start ();/ *關閉服務端*/public void stopservice () try/向所有人發(fā)送服務器關閉的消息messageshow. append ( ”
33、服務端已經(jīng)關閉n” );combobox.removeallitems();combobox mddltem ("所有人”);catch(exception e)/system.out.printin(e); 亠/ *向所有人發(fā)送服務器關閉的消息*/public void sendstoptoall()int count = userlinklist. getcount () ; /用戶總數(shù)int i = 0;while(i < count)node node = userlinklistfinduser (i);if(node = null) i + + ;continue;
34、trynode . output. writeobject (”服務關閉”);nodeoutput.flush ();catch (exception e)/system.out.printin (n$n+e);i + + ;/ *向所有人發(fā)送消息*/public void sendmsgtoall(string msg)int count = userlinklist getcount ();/用戶總數(shù)int i = 0;while(i < count)node node = userlinklist.finduser (i);if(node = null) i + + ;contin
35、ue;trynode . output .writeobject ("系統(tǒng)信息”);nodeoutput.flush ();node.output.writeobject(msg);nodeoutput.flush ();catch (exception e)/system.out.printin (nn+e); 'i + + ;sysmessage.settext (h h);/ * *向客戶端用戶發(fā)送消息*/public void sendsystemmessage()string tosomebody = comboboxgetselecteditem() .tostr
36、ing (); string message = sysmessage . gettext () + h n11;messageshow.append(message);/向所有人發(fā)送消息 if (tosomebody equalslgnorecase (”所有人” ) sendmsgtoall(message);else /向某個用戶發(fā)送消息node node = userlinklistfinduser(tosomebody); try node output. writeobject (”系統(tǒng)信息”);nodeoutput.flush ();nodeoutputwriteobject(m
37、essage); nodeoutputflush ();catch(exception e) /system, out print in (n ! ! ! ,f+e); sysmessage. settext ("") ; /將發(fā)送消息欄的消息清空public static void main(string args) server app=new server ();4. 1. 2 serverlisten. java該類實現(xiàn)服務端用戶上線與下線的偵聽。該類對用戶上線下線的偵聽是通過調(diào) 用用戶鏈表類(userlinklist)來實現(xiàn)的,當用戶上線與下線情況發(fā)生變化時,該
38、類會對主類的界面進行相應的修改。主要實現(xiàn)方法源代碼如下:public class serverlisten extends threadfserversocket server;jcombobox combobox;jtextarea textarea;jtextfield textfield;userlinklist userlinklist; /用八鏈表node client;serverreceive recvthread;public boolean isstop;/ *聊天服務端的用戶上線于下線偵聽類*/public serverlisten(serversocket server,
39、jcombobox combobox, jtextarea textarea,jtextfield textfield,userlinklist userlinklist)this.server = server;thiscombobox = combobox;thistextarea = textarea;thistextfield = textfield;thisuserlinklist = userlinklist;isstop = false;public void run() while(!isstop && !server.isclosed()tryclient =
40、 new node ();clientsocket = serveraccept ();client.output = newobjectoutputstream(clientsocketgetoutputstream();clientoutput.flush();client.input = newobjectinputstream(clientsocketget inputstream();clientusername =(string)clientinputreadobject();/顯示提示信息comboboxadditem(clientusername); userlinklist.
41、adduser(client);textarea append (11 + client. user name + " 上 線” + nnn);text field. set text ('* 在線用戶"+userlinklist get count () + n an,f);recvthread = newserverreceive(textarea,textfield,combobox, die nt, userl in klist);recvthread.start ();catch(exception e)4. l 3 serverreceive. java
42、該類是實現(xiàn)服務器端的消息的收發(fā)的類。該類分別定義了向某用戶及所有人發(fā) 送消息的方法,發(fā)送的消息會顯示在主界面類的界面上。主耍實現(xiàn)方法源代碼如 下:/ *服務器收發(fā)消息的類*/public class serverreceive extends thread jtextarea textarea;jtextfield textfield;jcombobox combobox;node client;userlinklist userlinklist; /用戶鏈農(nóng) public boolean isstop;public serverreceive(jtextarea textarea,jtext
43、field text field, jcombobox combobox,node client,userlinklist userlinklist) thistextarea = textarea;this.textfield = textfield;this.client = client;this.userlinklist = userlinklist; thiscombobox = combobox;isstop = false;public void run()/向所有人發(fā)送用戶的列表 senduserlist ();while(!isstop && !clients
44、ocketisclosed () trystring type = (string)clientinputreadobject(); if (type . equal signor ecase ( ”聊天信息” )string tosomebody =(string)clientinputreadobject();string status =(string)clientinputreadobject();string action =(string)clientinputreadobject();string message =(string)clientinputreadobject();
45、string msg = client.username+ l! 11 + action+開對n+ tosomebody+ ” 說:”+ message+ nnn;if (status equal signor ecase (111 肖悄話” ) msg = ” 悄悄話” + msg; textareaappend(msg);if (tosomebody . equal signor ecase (1所有人” ) sendtoall (msg) ; /向所有人發(fā)送消息else tryclientoutputwriteobject (”聊 天信息”);clientoutput.flush ();
46、client.output.writeobject(msg);clientoutput.flush();catch (exception e)/system, out print l_n#”+e);node node =userlinklistfinduser(tosomebody);if(node != null)node output. writeob ject ("聊天 信息”);nodeoutput.flush ();nodeoutputwriteobject(msg); nodeoutputflush();else if (type equal signor ecase (
47、"用八下線”)node node = userlinklistfinduser(clientusername);userlinklist.deluser(node);string msg = ”用戶 h + die nt usetname + h 下線n”;int count = userlinklist.getcount();comboboxremoveal1items();combobox . additem (,所有人');int i = 0;while(i < count)node = userlinklist-finduser(i);if (node = nu
48、ll) i + + ; continue;comboboxadditem(nodeusername);i + + ;comboboxsetselectedlndex(0);textereeappend(msg);text fie id. set text ('* 在線用戶"+ userlinklistgetcount () + nann );sendtoall (msg) ; /向所有人發(fā)送消息 senduserlist () ; /重新發(fā)送用戶列表,刷新break;catch (exception e)/system.out.printin(e); 亠/ *向所有人發(fā)送消息
49、* *向所有人發(fā)送用戶的列表*/4. 1. 4 porconf java該類繼承自jdialog,是用戶對服務器端偵聽端口進行修改配置的類。主要實 現(xiàn)方法源代碼如下:/ *生成端口設置對話框的類*/public class portconf extends jdialog jpanel panelport = new jpanel();jbutton save = new jbutton();jbutton cancel = new jbutton(); public static jlabel dlginfo=new jlabel ("默認端口號為:8888”); jpanel p
50、anelsave = new jpanel();jlabel message = new jlabel(); public static jtextfield portnumber ;public portconf(jframe frame) super(frame, true);try jblnit ();catch (exception e) eprintstacktrace();/設置運行位置,使對話框居中private void jblnit () throws exception this.setsize(new dimension(300, 120); this . settitl
51、e ("端口設置");message . settext ("請輸入偵聽的端口號:; portnumber = new jtextfield(10); portnumber.settext(n n + server.port); save settext (”保存”); cancel. settext ("取消”);panelportsetlayout(new flowlayout();panelport.add(message); panelportadd(portnumber);panelsave - add (new label (,f,!);pa
52、nelsave.add(save);panelsave.add(cancel);panelsave . add (new label (11n );container contentpane = getcontentpane(); contentpanesetlayout(new borderlayout();contentpaneadd (panelportz borderlayoutnor th); contentpaneadd(dlginfo, borderlayoutcenter);contentpane.add(panelsave, borderlayoutsouth);/保存按鈕的
53、事件處理saveaddactionlistener (new actionlistener()public void actionperformed (actionevent a) int saveport;trysaveport=integer.parselnt(portconf.portnumber.gettext();if (saveport<1 | | saveport>65535) portconf. dlginfo. set tex t ( ”偵聽 端口必須是0-65535之間的整數(shù)! ”);portconf.portnumber.settext(”);return;
54、server.port = saveport; dispose (); catch(numberformatexception e)portconf . dlginfo. settext錯誤的端口 號,端口號請?zhí)顚懻麛?shù)!”);portconf .portnumber. settext ( n 11); return;);/關閉對話框時的操作thisaddwindowli stener(new windowadapter() public void windowclosing(windowevent e) dlginfo. settext (n 默認端 口號為:8888n););/収消按鈕的事件處理cancel.addactionlistener(new actionlistener() public void actionperformed(actionevent e) dlgtnfo. settext (” 默認端口號為:8888n); dispose (););4. 1. 5 node, java用戶鏈表節(jié)點類,定義了鏈表小的用戶。主要實現(xiàn)方法源代碼如下:/ *用戶鏈表的結(jié)點類
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 班級科技活動組織與引導計劃
- 社團發(fā)展戰(zhàn)略計劃
- 可持續(xù)發(fā)展與財務規(guī)劃計劃
- 小兒輔食知識培訓課件
- 企業(yè)戰(zhàn)略控制概述
- 簡單的護理查房
- 靜脈輸血護理查房
- 鋰電池安全知識培訓課件
- 第十單元實驗活動6:酸、堿的化學性質(zhì)教學設計-2023-2024學年九年級化學人教版下冊
- 腰椎穿刺患者術(shù)后護理
- (二模)長春市2025屆高三質(zhì)量監(jiān)測(二)地理試卷(含答案)
- 2025天津市建筑安全員-C證考試題庫
- 2025年河南省高職單招計算機類職業(yè)技能測試題(附答案)
- GB/T 18936-2025禽流感診斷技術(shù)
- 《主題四 雞蛋撞地球》教學設計-2023-2024學年六年級下冊綜合實踐活動遼師大版
- 2025年北京控股集團招聘筆試參考題庫含答案
- 2025年國航機務系統(tǒng)AMECO工程師崗位校園招聘筆試參考題庫附帶答案詳解
- 巨量千川中級營銷師認證考試題(附答案)
- 2025中智集團招聘高頻重點提升(共500題)附帶答案詳解
- 《公路工程造價標準高海拔高寒地區(qū)補充規(guī)定》
- 金融公司早會內(nèi)容
評論
0/150
提交評論