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

正文內(nèi)容

java課程設(shè)計(jì)---java聊天室的系統(tǒng)的設(shè)計(jì)與開(kāi)發(fā)(含代碼)-java(參考版)

2025-01-23 06:31本頁(yè)面
  

【正文】 } 。 dispose()。 } } )。 } } } 36 )。 ()。 dispose()。 return。 if(savePort1 || savePort65535){ ( 偵聽(tīng)端口必須是 065535之間的整數(shù) !)。 //保存按鈕的事件處理 ( new ActionListener() { public void actionPerformed (ActionEvent a) { int savePort。 (DLGINFO, )。 (new BorderLayout())。 (new Label( ))。 (save)。 (portNumber)。 (new FlowLayout())。 (保存 )。 portNumber = new JTextField(10)。 (端口設(shè)置 )。 (false)。 } //設(shè)置運(yùn)行位置,使對(duì)話框居中 Dimension screenSize = ().getScreenSize()。 try { jbInit()。 public static JTextField portNumber 。 JPanel panelSave = new JPanel()。 JButton cancel = new JButton()。 /** * 生成端口設(shè)置對(duì)話框的類 */ public class PortConf extends JDialog { JPanel panelPort = new JPanel()。 import .*。 import .*。 Node next = null。 ObjectOutputStream output = null。 /** * 用戶鏈表的結(jié)點(diǎn)類 */ public class Node { String username = null。 } } 34 import .*。 //事件處理 ( new ActionListener() { public void actionPerformed(ActionEvent e) { dispose()。 (closePanel, )。 (titlePanel, )。 Container contentPane = getContentPane()。 (close)。 (help)。 (title)。 (false)。 \n+ 信息狀態(tài)欄中顯示服務(wù)器當(dāng)前的啟動(dòng)與停止?fàn)顟B(tài)、 + 用戶發(fā)送的消息和 \n 服務(wù)器端發(fā)送的系統(tǒng)消息。 \n+ 點(diǎn)擊 啟動(dòng)服務(wù) 按鈕便可在指定的端口啟動(dòng)服務(wù)。 (bg)。 (bg)。 } private void jbInit() throws Exception { (new Dimension(400, 200))。 ( (int) ( 400) / 2, (int) ( 320) / 2)。 } catch (Exception e) { 33 ()。 public Help(JFrame frame) { super(frame, true)。 JTextArea help = new JTextArea()。 JButton close = new JButton()。 JPanel contentPanel = new JPanel()。 import .*。 import .*。 } } import .*。 } return image。 } catch (InterruptedException _ex) { image = null。 try { (image, 0)。 image = ().getImage(url)。 Image image = null。//將發(fā)送消息欄的消息清空 } } /** * 通過(guò)給定的文件名獲得圖像 */ Image getImage(String filename) { URLClassLoader urlLoader = (URLClassLoader)(). getClassLoader()。 } catch(Exception e){ //(!!!+e)。 (message)。 try{ (系統(tǒng)信息 )。 //向所有人發(fā)送消息 if((所有人 )){ sendMsgToAll(message)。 String message = () + \n。 } ()。 } catch (Exception e){ //(+e)。 (msg)。 } try{ 31 (系統(tǒng)信息 )。 if(node == null) { i ++。//用戶總數(shù) int i = 0。 } i++。 ()。 continue。 while(i count){ Node node = (i)。 } } /** * 向所有人發(fā)送服務(wù)器關(guān)閉的消息 */ public void sendStopToAll(){ int count = ()。 30 (所有人 )。 (服務(wù)端已經(jīng)關(guān)閉 \n)。 (true)。 (true)。 stopItem .setEnabled(false)。 i ++。 ()。 while( i count){ Node node = (i)。 int count = ()。 = true。 ()。 } userLinkList = new UserLinkList()。 (true)。 stopServer .setEnabled(true)。 (false)。 29 (false)。 } } /** * 啟動(dòng)服務(wù)端 */ public void startService(){ try{ serverSocket = new ServerSocket(port,10)。 ()。 (0)。 } else if (obj == exitButton || obj == exitItem) { //退出程序 int j=( this,真的要退出嗎 ?,退出 , ,)。 } } else if (obj == portSet || obj == portItem) { //端口設(shè)置 //調(diào)出端口設(shè)置的對(duì)話框 PortConf portConf = new PortConf(this)。 } else if (obj == stopServer || obj == stopItem) { //停止服務(wù)端 int j=( this,真的停止服務(wù)嗎 ?,停止服務(wù) , ,)。 } /** * 事件處理 */ public void actionPerformed(ActionEvent e) { 28 Object obj = ()。 (0)。 (downPanel,)。 (showStatus)。 = 3。 = 0。 (sysMessageButton)。 = 3。 girdBagCon = new GridBagConstraints()。 (sysMessage,girdBagCon)。 = 1。 (messageLabel)。 = 3。 girdBagCon = new GridBagConstraints()。 (bobox,girdBagCon)。 = 2。 27 girdBagCon = new GridBagConstraints()。 (sendToLabel,girdBagCon)。 = 5。 = 2。 girdBagCon = new GridBagConstraints()。 (none,girdBagCon)。 = 5。 = 2。 = 0。 girdBagCon = new GridBagConstraints()。 girdBag = new GridBagLayout()。 messageLabel = new JLabel(發(fā)送消息 :)。 (this)。 (發(fā)送 )。 (false)。 (false)。 ()。 (false)//添加滾動(dòng)條 messageScrollPane = new JScrollPane(messageShow, , )。 (0)。 bobox = new JComboBox()。 (this)。 //添加按鈕的事件偵聽(tīng) (this)。 (this)。 (this)。 stopItem .setEnabled(false)。 (toolBar,)。 ()。//添加分隔欄 (startServer)。 //將按鈕添加到工具欄 (portSet)。 stopServer = new JButton(停止服務(wù) )。 //初始化按鈕 portSet = new JButton(端口設(shè)置 )。 (helpMenu)。 (serviceMenu)。 (stopItem)。 //添加菜單欄 (portItem)。 } /** * 程序初始化函數(shù) */ public void init(){ Container contentPane = getContentPane()。)。 //為幫助設(shè)置快捷鍵為 ctrl+p 25 (39。H39。H39。 ( (,))。X39。 ( (,))。T39。 ( (,))。S39。 ( (,))。P39。)。 (39。 //為服務(wù)菜單欄設(shè)置熱鍵 39。 (icon)。 (聊天室服務(wù)端 )。 ( (int) ( ()) / 2, (int) ( ()) / 2)。 //設(shè)置框架的大小 (faceSize)。//初始化程序 //添加框架的關(guān)閉事件處理 ()。 GridBagConstraints girdBagCon。 JPanel downPanel 。//退出按鈕 //框架的大小 Dimension faceSize = new Dimension(400, 600)。//啟動(dòng)服務(wù)端偵聽(tīng) JButton stopServer。 //建立工具欄中的按鈕組件 JButton portSet。 JMenuItem helpItem=new JMenuItem (幫助 (H))。 JMenuItem exitItem=new JMenuItem (退出 (X))。 JMenuItem startItem = new JMenuItem (啟動(dòng)服務(wù) (S))。 //建立菜單組 JMenu serviceMenu = new JMenu (服務(wù) (V))。//服務(wù)端消息的發(fā)送按鈕 UserLinkList userLinkList。 JTextField sysMessage。//信息顯示的滾動(dòng)條 JTextField showStatus。//選擇發(fā)送消息的接受者 JTextArea messageShow。//服務(wù)端 Socket Image icon。 /* * 聊天服務(wù)端的主框架類 */ public class ChatServer extends JFrame implements ActionListener{ public static int port =
點(diǎn)擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1