?? clientsendfile.java~29~
字號:
import java.io.*;
import java.net.*;
import java.util.*;
import javax.swing.text.BadLocationException;
public class ClientSendFile {
ServerSocket sendFileSocket=null;
Socket socket=null;
File toSendFile=null;
Hashtable saveThread=new Hashtable();
static Hashtable saveServerSocket=new Hashtable();
String key=null;
Vector toPeoples;
FileCancelButton fileCancelButton;
public ClientSendFile(File file,Vector toPeoples){
toSendFile = file;
this.toPeoples = toPeoples;
Enumeration enum = this.toPeoples.elements();
while (enum.hasMoreElements()) {
String toPeople=(String) enum.nextElement();
// System.out.println(enum.nextElement()+" "+toSendFile);
fileCancelButton=new FileCancelButton(toPeople,toSendFile);
try{
ChatArea.style.addStylesToDocument(ChatArea.privateDoc,
fileCancelButton);
ChatArea.privateDoc.insertString(ChatArea.privateDoc.getLength(), " ",
ChatArea.privateDoc.getStyle("jpanel"));
}catch(BadLocationException e){
}
Thread peopleThread = new Thread(new PeopleThread(toSendFile,
toPeople));
peopleThread.start();
try {
Thread.sleep(1500);
}
catch (Exception e) {
}
}
}
public static void main(String[] args) {
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -