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

正文內(nèi)容

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

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

下一頁面
 

【正文】 uttonLogin。!().equals()amp。!().equals()amp。!().equals()){ if(!().equals(())){ ().showAlert(兩次密碼輸入不一致)。 new Thread(gif).start()。 (, out)。 } } }catch(Exception e){ ()。 private JScrollPane jScrollPane = null。//所有好友對(duì)應(yīng)樹節(jié)點(diǎn) private LinkInfo linkInfo。 = linkInfo。 } /** * This method initializes jFrame * * return */ public void closeFrame(){ ()。 (Talking)。 } })。 (getJButtonFind(), null)。 (new Rectangle(1, 384, 199, 29))。 } return jButtonFind。 } /** * This method initializes jTree * * return */ private JTree getJTree(DefaultMutableTreeNode nodes) { //if (jTree == null) { jTree = new JTree(nodes)。 //} return jTree。 } String userInfo = (node)。 } for(int i =0。 } public String getUserInfoByTreeNode(DefaultMutableTreeNode node){ if(allTreeNodes!=nullamp。i++){ if(((i).getDmtn())){ return (i).getUserInfo()。amp。i++){ //不將自己放在好友列表上 if((i).equals(me)){ continue。 (friend)。 // jve:declindex=0:visualconstraint=168,56 private JPanel jContentPane = null。 private JScrollPane jScrollPane = null。 private String target。 /** * This method initializes jScrollPane * * return */ private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane()。 } // 關(guān)閉窗口的同時(shí)刪除聊天窗口信息 public void closeFrameAndClearTalkWindowInfo() { for (int i = 0。 } } ()。 (false)。 = target。 } try { out = ().getOutputStream()。 (new Dimension(361, 349))。 removeTalkWindowInfo()。 i ().size()。 (null)。 (null)。 (true)。 (new Rectangle(5, 203, 333, 35))。 } /** * This method initializes jButton * * return */ private JButton getJButton() { if (jButton == null) { jButton = new JButton()。 } })。 return false。 ().setValue( ().getMaximum())。// 當(dāng)前聊天對(duì)象是否在線 for (int i = 0。 } } // 如果當(dāng)前聊天對(duì)象不在線,則告知用戶,此好友已下線 if (!friendOnline) { (() + + 已下線..信息發(fā)送失敗\n)。 (target, out)。 ()。 ().setValue( ().getMaximum())。 if (v == ) { // 同意接收 JFileChooser fd = new JFileChooser()。 readyforgetFile = ()。 } else { // 不同意接收 (, out)。 for (int i = 0。 } if (t instanceof Container) { textField = getTextField((Container) t)。 long len = (in)。 //總共讀取的字節(jié)量 long sum=0。 ().setValue( ().getMaximum())。 loaded = (int)(sum+1024len?1024:lensum)。\n)。\n)。 (target, out)。 int len = 1。\n)。 } } }.start()。 } } // 傳送文件請(qǐng)求 public void sendFile() { JFileChooser fd = new JFileChooser()。 if (f != null) { readyforsendfile = f。 (請(qǐng)求發(fā)送完畢)。 ServerSocket ss = new ServerSocket(7788)。 } } catch (IOException e) { ()。 //當(dāng)前客戶端的輸入流 private InputStream in。 } //線程體 public void run() { try { //獲取當(dāng)前連接客戶端的輸入流,用于獲取來自客戶端的信息 in = ()。 doLogin()。 break。 //文本私聊 case : (message:私聊消息)。 //請(qǐng)求個(gè)人傳送文件 case : (message:請(qǐng)求傳送文件至私人)。 sendFileToOne1()。 break。 } catch (Excep。 } finally{ //從共享中刪除當(dāng)前用戶 (())。 //請(qǐng)求開始傳送文件 case : (message:開始向私人傳送文件)。 break。 break。 sendMessageToAll()。 //注冊(cè)操作 case : (message:注冊(cè)操作)。 int mand = 1。 //當(dāng)前客戶端對(duì)應(yīng)的用戶信息 private UserInfo userinfo。 ()。 while(true){ DoServiceForClient dsfc = new DoServiceForClient(())。 public Server(){ users = new HashMapString,UserInfo()。 (target, out)。 File f = ()。\n)。 (true)。 } ()。 FileInputStream fis = new FileInputStream( readyforsendfile)。 (false)。 } catch (Exception e) { ()。 } } ()。 (buf,0,loaded)。 (() + 正在接收文件。 byte[] buf = new byte[1024]。 } } } return textField。 i++) { Component t = (i)。 (NO, out)。 (from, out)。 (fileName)。 ().setValue( ().getMaximum())。 } return false。 (() + 我說:\n + () + \n)。 return false。 i++) { if (().get(i).equals(target)) { friendOnline = true。 return true。 ((), out)。 } public boolean sendMessageToServer() { // 如果已經(jīng)沒有好友在線,則告知用戶,此好友已下線 if (().size() == 0) { (已無用戶在線...\n)。 (發(fā)送文件)。 } } })。 } return jPanel。 (getJTextField(), null)。 } return jContentPane。 break。 } return jFrame。 (getJContentPane())。 } } /** * This method initializes jFrame * * return */ private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame()。 if ((ALL)) { (群聊中...)。 } public TalkWindow(String me, String target, LinkInfo linkInfo) { ().setVisible(true)。 } /** * This method initializes jTextArea * * return */ private JTextArea getJTextArea() { if (jTextArea == null) { jTextArea = new JTextArea()。 i++) { if (().get(i).getTalkingWindow() .equals(this)) { ().remove(i)。 (getJTextArea())。// 連接服務(wù)器端的輸出流 // 準(zhǔn)備傳送的文件 private File readyforsendfile。 private LinkInfo linkInfo。 private JTextField jTextField = null。 }} 聊天窗口和文件傳輸界面 服務(wù)器端和客戶端通過I/O流,在建立用戶建立會(huì)話之前,會(huì)先建立一個(gè)socket連接,用來接收請(qǐng)求和發(fā)送請(qǐng)求消息,用戶之間的數(shù)據(jù)傳輸是通過Socket連接服務(wù)器端然后轉(zhuǎn)給另一個(gè)服務(wù)器端的,其中我們通過流來翻譯字節(jié)和復(fù)制字符然后傳輸給用戶,和傳輸文件的原理是差不多的。 TalkingMainTreeInfo treeNodeInfo = new TalkingMainTreeInfo((i),friend)。 for(int i =0。 } //初始化好友樹的方法 public DefaultMutableTreeNode initTree(){ DefaultMutableTreeNode root = new DefaultMutableTreeNode (好友列表(+me+))。()0){ for(int i =0。i++){ if(().get(i).getTargetUserInfo().equals(id)){ return true。 ().add(new TalkWindowInfo(tw,userInfo))。 ().add(new TalkWindowInfo(tw,ALL))。 if(!().equals(好友列表(+me+))){
點(diǎn)擊復(fù)制文檔內(nèi)容
電大資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1