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

正文內(nèi)容

面向?qū)ο蟪绦蛟O(shè)計(jì)課程設(shè)計(jì)論文-閱讀頁

2025-07-08 22:41本頁面
  

【正文】 JPanel p1。 JTextField jt。 JButton b3。 JScrollPane jscrollPanel。 JTextField j1。 private int port=8888。 BufferedReader cin。 Thread cc。 public Client() { super(網(wǎng)絡(luò)聊天客戶端)。 (new Color(245,211,211))。 jt=new JTextField(10)。 (this)。 (jt)。 add(p1,)。 (new Color(245,211,211))。 add(jscrollPanel,)。 (new Color(245,211,211))。 jb=new JButton(發(fā)送)。 (this)。 (j1)。 (b3)。 setVisible(true)。 setDefaultCloseOperation()。 ()。 if(out!=null) { (exit)。 } else if(()==jb) { if(cc!=null) { (())。 (null)。 String s=(dat)。 cin=new BufferedReader(new InputStreamReader(()))。 (p)。 if((ok)) { (s+ 已連接聊天服務(wù)器+\n\t)。 } else { (s+ 服務(wù)器連接失敗+\n\t)。 } } catch(Exception e) { } return false。 try { while((aa=())!=nullamp。 cc!=null) { Date dat=new Date()。 if((服務(wù)器退出)) { (s+\t服務(wù)器未響應(yīng),請重新連接\n)。 } else { (s+\t服務(wù)器發(fā)送:+aa+\n)。 ()。 } catch(Exception e) { } } public static void main(String[] args) { Client a=new Client()。import .*。import .*。import 。import 。 JButton b1。 JButton b3。//四個(gè)按鈕:運(yùn)行,中斷,清空,退出,最上面 JTextArea jt1。//一個(gè)文本區(qū) JPanel p2。 JButton jb。 JTextArea showClient。 private ServerSocket server。 BufferedReader cin。 Thread ss。 public Server() { super(網(wǎng)絡(luò)聊天服務(wù)器)。 (new GridLayout(1,2))。 b2=new JButton(退出)。 b4=new JButton(中斷)。 (this)。 (b1)。 (b3)。 add(p1,)。 (new Color(245,211,211))。//添加滾動條 add(jscrollPanel,)。 setBounds(500,60,500,300)。 } public void actionPerformed(ActionEvent e)//實(shí)現(xiàn)ActionEvent接口中的actionPerformed方法 { Date dat=new Date()。 if(()==b1) { try { server=new ServerSocket(port)。//線程啟動 ()。 (s+\t\t\t\t服務(wù)器已啟動\n)。 if(out!=null) { (服務(wù)器退出)。 } else if(()==jb) { if(ss!=null) { dat=new Date()。 (())。 (null)。 OtherThread qq=new OtherThread(client)。 ()。 OtherThread(Socket y) { s=y。//字節(jié)流轉(zhuǎn)化為字符流 out=new PrintWriter((),true)。 (\n\t+userName+加入~\n)。//向客戶發(fā)送消息 String aa=。 if((exit)) { break。 } } } catch(Exception aa) { } } }} public static void main(String[] args) { Server a=new Server
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1