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

正文內(nèi)容

java課程設(shè)計(jì)之簡(jiǎn)單聊天室-資料下載頁(yè)

2025-06-29 07:28本頁(yè)面
  

【正文】 //設(shè)置框架的大小 (faceSize)。 //設(shè)置運(yùn)行時(shí)窗口的位置 Dimension screenSize = ().getScreenSize()。 ( (int) ( ()) / 2, (int) ( ()) / 2)。 (false)。 (聊天室客戶端)。 //設(shè)置標(biāo)題 setVisible(true)。 //為操作菜單欄設(shè)置熱鍵39。V39。 (39。O39。)。 //為用戶登錄設(shè)置快捷鍵為ctrl+i (39。I39。)。 ( (,))。 //為用戶注銷快捷鍵為ctrl+l (39。L39。)。 ( (,))。 //為退出快捷鍵為ctrl+x (39。X39。)。 ( (,))。 //為設(shè)置菜單欄設(shè)置熱鍵39。C39。 (39。C39。)。 //為用戶設(shè)置設(shè)置快捷鍵為ctrl+u (39。U39。)。 ( (,))。 //為連接設(shè)置設(shè)置快捷鍵為ctrl+c (39。C39。)。 ( (,))。 //為幫助菜單欄設(shè)置熱鍵39。H39。 (39。H39。)。 //為幫助設(shè)置快捷鍵為ctrl+p (39。H39。)。 ( (,))。 } /** * 程序初始化函數(shù) */ public void init(){ Container contentPane = getContentPane()。 (new BorderLayout())。 //添加菜單欄 (loginItem)。 (logoffItem)。 (exitItem)。 (operateMenu)。 (userItem)。 (connectItem)。 (conMenu)。 (helpItem)。 (helpMenu)。 setJMenuBar (jMenuBar)。 //初始化按鈕 loginButton = new JButton(登錄)。 logoffButton = new JButton(注銷)。 userButton = new JButton(用戶設(shè)置 )。 connectButton = new JButton(連接設(shè)置 )。 exitButton = new JButton(退出 )。 //當(dāng)鼠標(biāo)放上顯示信息 (連接到指定的服務(wù)器)。 (與服務(wù)器斷開連接)。 (設(shè)置用戶信息)。 (設(shè)置所要連接到的服務(wù)器信息)。 //將按鈕添加到工具欄 (userButton)。 (connectButton)。 ()。//添加分隔欄 (loginButton)。 (logoffButton)。 ()。//添加分隔欄 (exitButton)。 (toolBar,)。 checkbox = new JCheckBox(悄悄話)。 (false)。 actionlist = new JComboBox()。 (微笑地)。 (高興地)。 (輕輕地)。 (生氣地)。 (小心地)。 (靜靜地)。 (0)。 //初始時(shí) (true)。 (false)。 //為菜單欄添加事件監(jiān)聽 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 //添加按鈕的事件偵聽 (this)。 (this)。 (this)。 (this)。 (this)。 bobox = new JComboBox()。 (所有人,0)。 (0)。 messageShow = new JTextArea()。 (false)。 //添加滾動(dòng)條 messageScrollPane = new JScrollPane(messageShow, , )。 (new Dimension(400,400))。 ()。 clientMessage = new JTextField(23)。 (false)。 clientMessageButton = new JButton()。 (發(fā)送)。 //添加系統(tǒng)消息的事件偵聽 (this)。 (this)。 sendToLabel = new JLabel(發(fā)送至:)。 express = new JLabel( 表情: )。 messageLabel = new JLabel(發(fā)送消息:)。 downPanel = new JPanel()。 girdBag = new GridBagLayout()。 (girdBag)。 girdBagCon = new GridBagConstraints()。 = 0。 = 0。 = 5。 = 2。 = 5。 = 5。 JLabel none = new JLabel( )。 (none,girdBagCon)。 (none)。 girdBagCon = new GridBagConstraints()。 = 0。 = 2。 = new Insets(1,0,0,0)。 // = 5。 // = 5。 (sendToLabel,girdBagCon)。 (sendToLabel)。 girdBagCon = new GridBagConstraints()。 =1。 = 2。 = 。 (bobox,girdBagCon)。 (bobox)。 girdBagCon = new GridBagConstraints()。 =2。 = 2。 = 。 (express,girdBagCon)。 (express)。 girdBagCon = new GridBagConstraints()。 = 3。 = 2。 = 。 // = new Insets(1,0,0,0)。 // = 5。 // = 5。 (actionlist,girdBagCon)。 (actionlist)。 girdBagCon = new GridBagConstraints()。 = 4。 = 2。 = new Insets(1,0,0,0)。 // = 5。 // = 5。 (checkbox,girdBagCon)。 (checkbox)。 girdBagCon = new GridBagConstraints()。 = 0。 = 3。 (messageLabel,girdBagCon)。 (messageLabel)。 girdBagCon = new GridBagConstraints()。 = 1。 = 3。 = 3。 = 1。 (clientMessage,girdBagCon)。 (clientMessage)。 girdBagCon = new GridBagConstraints()。 = 4。 = 3。 (clientMessageButton,girdBagCon)。 (clientMessageButton)。 showStatus = new JTextField(35)。 (false)。 girdBagCon = new GridBagConstraints()。 = 0。 = 5。 = 5。 (showStatus,girdBagCon)。 (showStatus)。 (messageScrollPane,)。 (downPanel,)。 //關(guān)閉程序時(shí)的操作 ( new WindowAdapter(){ public void windowClosing(WindowEvent e){ if(type == 1){ DisConnect()。 } (0)。 } } )。 } /** * 事件處理 */ public void actionPerformed(ActionEvent e) { Object obj = ()。 if (obj == userItem || obj == userButton) { //用戶信息設(shè)置 //調(diào)出用戶信息設(shè)置對(duì)話框 UserConf userConf = new UserConf(this,userName)。 (true)。 userName = 。 } else if (obj == connectItem || obj == connectButton) { //連接服務(wù)端設(shè)置 //調(diào)出連接設(shè)置對(duì)話框 ConnectConf conConf = new ConnectConf(this,ip,port)。 (true)。 ip = 。 port = 。 } else if (obj == loginItem || obj == loginButton) { //登錄 Connect()。 } else if (obj == logoffItem || obj == logoffButton) { //注銷 DisConnect()。 ()。 } else if (obj == clientMessage || obj == clientMessageButton) { //發(fā)送消息 SendMessage()。 ()。 } else if (obj == exitButton || obj == exitItem) { //退出 int j=( this,真的要退出嗎?,退出, ,)。 if (j == ){ if(type == 1){ DisConnect()。 } (0)。 } } else if (obj == helpItem) { //菜單欄中的幫助 //調(diào)出幫助對(duì)話框 Help helpDialog = new Help(this)。 (true)。 } } public void Connect(){ try{ socket = new Socket(ip,port)。 } catch (Exception e){ ( this,不能連接到指定的服務(wù)器。\n請(qǐng)確認(rèn)連接設(shè)置是否正確。,提示, ,)。 return。 } try{ output = new ObjectOutputStream(())。 ()。 input = new ObjectInputStream(() )。 (userName)。 ()。 recvThread = new ClientReceive(socket,output,input,bobox,messageShow,showStatus)。 ()。 (false)。 (false)。 (false)。 (false)。 (false)。 (false)。 (true)。 (true)。 (true)。 (連接服務(wù)器 +ip+:+port+ 成功...\n)。 type = 1。//標(biāo)志位設(shè)為已連接 } catch (Exception e){ (e)。 return。 } } public void DisConnect(){ (true)。 (true)。 (true)。 (true)。 (true)。 (true)。 (false)。 (false)。 (false)。 if(()){ return 。 } try{ (用戶下線)。 ()。 ()。 ()。 ()。 (已經(jīng)與服務(wù)器斷開連接...\n)。 type = 0。//標(biāo)志位設(shè)為未連接 } catch (Exception e){ // } } public void SendMessage(){ String toSomebody = ().toString()。 String status = 。 if(()){ status = 悄悄話。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1