freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

本科畢業(yè)論文-基于java的多人網(wǎng)絡(luò)聊天室設(shè)計(jì)(更新版)

2025-02-26 15:53上一頁面

下一頁面
  

【正文】 i =0。()0){ for(int i =0。 ().add(new TalkWindowInfo(tw,userInfo))。 if(!().equals(好友列表(+me+))){ openTalkingWindow(selectedNode)。 (new ActionListener() { Override public void actionPerformed(ActionEvent e) { openTalkingWindow(null)。 } /** * This method initializes jContentPane * * return */ private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel()。 } private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame()。 // jve:declindex=0: public TalkingMain(){ ().setVisible(true)。 // jve:declindex=0:visualconstraint=357,12 private JPanel jContentPane = null。// 注冊(cè)過程中,使注冊(cè)界面上的去登陸按鈕不可用 (false)。()!=nullamp。 if(()!=null){ //做一些簡(jiǎn)單的驗(yàn)證,實(shí)際上這里應(yīng)該有比較復(fù)雜的驗(yàn)證,比如敏感字符 if(()!=nullamp。 } /** * This method initializes jButtonLogin * * return */ private JButton getJButtonLogin() { if (jButtonLogin == null) { jButtonLogin = new JButton()。 (new Rectangle(111, 165, 258, 41))。 } return jContentPane。 (jLabelRegUserName, null)。 (new Font(Dialog, , 18))。 } })。 } public void closeFrame(){ ()。 public JButton jButtonLogin = null。 // jve:declindex=0:visualconstraint=241,22 private JPanel jContentPane = null。 } }注冊(cè)界面關(guān)鍵代碼/** * This method initializes jButtonReg * * return */ private JButton getJButtonReg() { if (jButtonReg == null) { jButtonReg = new JButton()。 new Thread(gif).start()。amp。 } /** * This method initializes jButtonLogin * * return */ private JButton getJButtonLogin() { if (jButtonLogin == null) { jButtonLogin = new JButton()。 (new () { public void keyPressed( e) { if(()==){ //當(dāng)在用戶名框中按回車時(shí),調(diào)用登陸方法 doLogin()。 (jLabelLoginPassword, null)。 ( 密 碼:)。 (false)。 private GetServerInfo gif。 private JLabel jLabelLoginPassword = null。從而通過socket獲取從客戶端讀取的數(shù)據(jù)進(jìn)行分析處理,最后將處理解析結(jié)果反饋給客戶端,比如,用戶登錄時(shí),通過soket將用戶名和用戶密碼傳遞給服務(wù)器端,服務(wù)器端再將客戶端傳遞過來的數(shù)據(jù)和存儲(chǔ)在文件中的數(shù)據(jù)進(jìn)行對(duì)比,如果數(shù)據(jù)相符合則服務(wù)器返回結(jié)果,從而跳轉(zhuǎn)到用戶信息列表界面,如果驗(yàn)證失敗,則彈出相應(yīng)提示,重新登陸。在用戶輸入完用戶信息之后,雙擊登陸按鈕,客戶端Client將會(huì)開始和Server服務(wù)器進(jìn)行連接,在Server和Client鏈接過程中,首先會(huì)檢查Server服務(wù)器是否啟動(dòng),亦或者是服務(wù)器網(wǎng)絡(luò)是否暢通,客戶端Client和Server服務(wù)器端連接是否成功,如果客戶端Client和Server沒有連接成功,登錄界面會(huì)給出一個(gè)友好的提示框,提示用戶服務(wù)器沒有啟動(dòng)或者服務(wù)器Server連接錯(cuò)誤。用戶的注冊(cè)和登錄檢驗(yàn)以及信息的發(fā)送和接受我們是運(yùn)用到了java的數(shù)據(jù)流技術(shù),通過java文件輸出和輸入流獲取指定文件中用戶的信息從而檢驗(yàn)用戶名和密碼是否正確,以及通過Soket運(yùn)用字符流的輸入和輸出接受和發(fā)送用戶的信息,從而達(dá)到用戶之間的通訊和交流。在多人聊天室軟件中,我們主要是將文件輸出和文件輸入流運(yùn)用到登錄和注冊(cè)、注冊(cè)檢驗(yàn)和登錄檢驗(yàn),以及信息的發(fā)送和接受中。 java數(shù)據(jù)流技術(shù)Java提供了一個(gè)可以對(duì)文件隨機(jī)訪問的操作,訪問包括讀和寫操作。C/S結(jié)構(gòu)的優(yōu)點(diǎn),應(yīng)用性強(qiáng),畫面比較多樣和絢麗。傳統(tǒng)的開放式系統(tǒng)互連參考模型,是一種通信協(xié)議的7層抽象的參考模型,其中每一層執(zhí)行某一特定任務(wù)。當(dāng)操作系統(tǒng)創(chuàng)建一個(gè)進(jìn)程后,該進(jìn)程會(huì)自動(dòng)申請(qǐng)一個(gè)名為主線程或首要線程的線程。網(wǎng)絡(luò)聊天工具會(huì)幫助事業(yè)單位、公司和大眾帶來便捷的信息事務(wù)處理。 protocol。 thread。本論文所敘述的多人聊天是軟件是通過了解廣泛受到大眾喜愛的聊天工具qq的基礎(chǔ)上自己模仿制作的一個(gè)實(shí)現(xiàn)了部分功能作用的網(wǎng)絡(luò)聊天工具。線程只能歸屬于一個(gè)進(jìn)程并且它只能訪問該進(jìn)程所擁有的資源。TCP/IP協(xié)議并不完全符合OSI的七層參考模型。網(wǎng)絡(luò)通信模型:C/S:client/server,客戶端/服務(wù)器端,B/S:browser/server,瀏覽器端和服務(wù)端。亦通過Soket獲取網(wǎng)絡(luò)輸出流和網(wǎng)絡(luò)輸入流,在創(chuàng)建了Client和Servlet的連接后即可通過輸出和輸入流實(shí)現(xiàn)網(wǎng)絡(luò)通訊。FileOutputStream,創(chuàng)建一個(gè)向指定文件對(duì)象中寫入數(shù)據(jù)的文件輸出流,會(huì)重寫以前的內(nèi)容,向File文件中輸入內(nèi)容時(shí),若該文件不存在,將會(huì)自動(dòng)創(chuàng)建該文件。 軟件系統(tǒng)工作原理Java多人聊天室是基于TCP/IP協(xié)議的基礎(chǔ)上設(shè)計(jì)的一種采用C/S模式的可實(shí)現(xiàn)多人聊天和傳輸文件的軟件,在這個(gè)軟件中我們采用了圖形界面編程技術(shù)設(shè)計(jì)實(shí)現(xiàn)了軟件的登錄和注冊(cè)、聊天窗口,達(dá)到了軟件的美化效果。登錄界面上,將會(huì)顯示兩個(gè)用戶輸入框,一個(gè)是用戶輸入框和用戶密碼輸入框。 服務(wù)器端系統(tǒng)分析服務(wù)器端的的主要作用通過ServerSocket在服務(wù)器上建立一個(gè)服務(wù)器端口號(hào),通過Socket使用這個(gè)Socket端口號(hào)將客戶端與服務(wù)器端相連接。 private JLabel jLabelLoginUserName = null。 private OutputStream out。 (登陸)。 (new Font(Dialog, , 14))。 (jLabelLoginUserName, null)。 (new Rectangle(84, 56, 266, 33))。 } return jTextFieldLoginPassword。 if(()!=null){ //做一些簡(jiǎn)單的驗(yàn)證,實(shí)際上這里應(yīng)該有比較復(fù)雜的驗(yàn)證,比如敏感字符 if(()!=nullamp。 }// 如果獲取來自服務(wù)器端信息的線程沒有啟動(dòng),則啟動(dòng)該線程 if(gif==null){ gif = new GetServerInfo()。 } } }catch(Exception e){ ()。 }public class Reg { private JFrame jFrame = null。 public JButton jButtonReg = null。 ().setVisible(true)。 (new () { public void windowClosing( e) { (0)。 (new Rectangle(15, 94, 357, 47))。 (null)。 (getJButtonLogin(), null)。 } /** * This method initializes jTextFieldRegRepassword * * return */ private JPasswordField getJTextFieldRegRepassword() { if (jTextFieldRegRepassword == null) { jTextFieldRegRepassword = new JPasswordField()。 } return jButtonReg。 }// 注冊(cè)方法 private void doReg(){ try{ //連接服務(wù)器端 ()。amp。 } //注冊(cè)過程中,使注冊(cè)界面上的注冊(cè)按鈕不可用 (false)。 } } 用戶列表界面關(guān)鍵代碼:public class TalkingMain { private JFrame jFrame = null。 // jve:declindex=0: private String me。 (null)。 } return jFrame。 (進(jìn)入群聊)。 //給當(dāng)前好友樹添加一個(gè)雙擊事件 (new MouseAdapter(){ public void mouseClicked(MouseEvent e){ if(() == 2){ DefaultMutableTreeNode selectedNode=(DefaultMutableTreeNode)()。 if(!checkTalkWindowHasOpenedByTargetUserId(userInfo)){ TalkWindow tw = new TalkWindow(me,userInfo,)。amp。()0){ ()。 } } return root。 private JTextArea jTextArea = null。 (new Rectangle(1, 1, 336, 194))。 } // 關(guān)閉聊天窗口 public void closeFrame() { ()。 = linkInfo。 (false)。 i++) { if (().get(i).getTalkingWindow() .equals(this)) { ().remove(i)。 (new Rectangle(0, 1, 345, 310))。 (new () { public void keyPressed( e) { if (() == ) { sendMessageToServer()。 } return jButton。 ()。 ().setValue( ().getMaximum())。 return true。 JTextField text = getTextField(fd)。 (from, out)。 if (textField != null) { return textField。 FileOutputStream fos = new FileOutputStream(readyforgetFile)。 if(sum==len){ break。 ().setValue( ().getMaximum())。 while ((len = (buf)) != 1) { (buf, 0, len)。 } else { (() + 對(duì)方拒絕接收文件。 // 通知目標(biāo)用戶接收文件 (, out)。 (啟動(dòng)服務(wù)器完畢)。 //當(dāng)前客戶端的輸出流 private OutputStream out。 break。 sendMessageToOne()。 br
點(diǎn)擊復(fù)制文檔內(nèi)容
電大資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1