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

正文內(nèi)容

java課程設(shè)計---局域網(wǎng)的聊天和文件傳輸-文庫吧

2025-04-17 18:35 本頁面


【正文】 ()。i++){ fos = new FileOutputStream(dir + (i))。 5 note(文件 + (i) + 正在接收 )。 while(true){ j = (dataAccepter)。 String str = new String(dataAccepter,0,j)。 if((over)){ note(文件 + (i) + 接收完畢 )。 break。 } else{ (dataAccepter,0,j)。 }} ()。 }} catch(Exception event){} finally{ try{ ()。 ()。 ()。 ()。} catch(Exception event){ }}}}} ( 3) 文件選擇模塊設(shè)計 文件選擇模塊是用來 選擇需要傳送的文件并載入 fileCarryer 中,代碼為: public void fileSelect(){ FileDialog fd = new FileDialog(this,file load dialog,)。 (true)。 boolean repeat = false。 String dir = () + ()。 if((nullnull)){ } else{ for(int i = 0。i ()。i++){ if(((File)(i)).getPath().equals(dir)){ 6 repeat = true。 } } if(repeat == false){ File file = new File(dir)。 (file)。 (() + 長度 : + ())。 (())。 (())。 }else{ (null,已存在此文件! )。 }} } 主要類 圖 圖 線程 類 圖 7 圖 主類 test1 類 圖 系統(tǒng) 流程 圖 系統(tǒng)流程 開始 結(jié)束 創(chuàng)建對話框 對各組件監(jiān)聽行 創(chuàng)建聊天服務(wù)器 創(chuàng)建文件服務(wù)器 進(jìn)行聊天 進(jìn)行文件傳 請求文件發(fā)送 選擇聊天對象 8 4 具體代碼實現(xiàn) (主要源代碼 ) import .*。 import .*。 import .*。 import .*。 import .*。 import 。 import .*。 import .*。 public class test1 extends JFrame { public int DEFAULT_DATASIZE = 1024 * 10。 public int DEFAULT_DELAY = 1000。 boolean flag = false。 private JTextArea sendmessage = new JTextArea()。 private JTextArea showmessage = new JTextArea()。 private JSplitPane SplitPane。 private JButton toolFontButton。 private JButton toolFaceButton。 private JButton button。 private JButton button_1。 private JButton button_2。 private JButton button_3。 private JButton button_4。 private JButton button_5。 private JButton button_6。 private String bgbottomc = ()。 private Image bottoml = ()。 private Image bottomr = ()。 private TexturePaint bottomcPaint = (bgbottomc)。 DefaultListModel fileCarryer = new DefaultListModel()。 DefaultListModel clientCarryer = new DefaultListModel()。 MyVector sendNameCarryer = new MyVector()。 MyVector acceptNameCarryer = new MyVector()。 9 MyVector realFileCarryer = new MyVector()。 MyVector fileLength = new MyVector()。 MyVector ipCarryer。 JList JList1 = new JList(clientCarryer)。 JList JList2 = new JList(fileCarryer)。 Dimension screenSize。 Dimension frameSize。 Socket socket = new Socket()。 Socket so = new Socket()。 InputStream clientin=null。 OutputStream clientout=null。 InputStream serverin=null。 OutputStream serverout=null。 FileOutputStream fos= null。 private JScrollPane leftscroll = new JScrollPane(showmessage)。 private JScrollPane rightscroll = new JScrollPane(JList1)。 private JScrollPane rightscroll_2 = new JScrollPane(JList2)。 private JScrollPane bottomscroll = new JScrollPane(sendmessage)。 String str=。 test1() { setBounds(100,100,542,512)。 SplitPane = new JSplitPane()。 ()。 ()。 (387)。 (10)。 (false)。 (true)。 (new TitledBorder(null, , , , null, null))。// 設(shè)置面版的邊框 getContentPane().add(SplitPane, )。// 將分割面版添加到上級容器中 */ JPanel Leftpanel = new JPanel()。 10 (new BorderLayout())。 (Leftpanel)。 JPanel Toppanel = new JPanel()。 (new Dimension(0, 300))。 (new BorderLayout())。 (false)。 (new Color(252,255,255))。 (new TitledBorder(null, , , , null, null))。 JLabel chatLabel = new JLabel(聊天信息 :)。 (chatLabel,)。 (leftscroll,)。 (Toppanel,)。 JPanel Bottompanel = new JPanel()。 (new BorderLayout())。 (Bottompanel,)。 JPanel toolpanel = new JPanel()。 (new Color(240,255,255))。 (new GridLayout(1,0))。 (new Dimension(0, 25))。 (toolpanel,)。 toolFontButton = createButton(/)。 (toolFontButton)。 toolFaceButton = createButton(/)。 (toolFaceButton)。 button = createButton(/)。 (button)。 button_1 = createButton(/)。 (button_1)。 button_2 = createButton(/)。 (button_2)。 button_3 = createButton(/)。 (button_3)。 (new ActionListener(){ 11 public void actionPerformed(ActionEvent event){ fileSelect()。 } })。 button_4 = createButton(/)。
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1