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

正文內(nèi)容

基于java的聊天系統(tǒng)-資料下載頁

2025-06-27 17:59本頁面
  

【正文】 serverSocket。 private ServerFrame sFrame。 private static Vector userOnline = new Vector(1, 1)。 private static Vector v = new Vector(1,1)。 public AppServer() {// 創(chuàng)建服務(wù)器 啟動服務(wù)監(jiān)聽1001端口 sFrame = new ServerFrame()。 try { serverSocket = new ServerSocket(1001)。 // 獲取服務(wù)器的主機(jī)名和IP地址 InetAddress address = ()。 (())。 (())。 (1001)。 } catch (IOException e) {fail(e, 不能啟動服務(wù)!)。} (已啟動...)。 ()。 // 啟動線程 }public static void fail(Exception e, String str) {//退出服務(wù)器 (str + 。 + e)。 }public void run() {//監(jiān)聽客戶的請求,當(dāng)有用戶請求時創(chuàng)建 Connection線程 try { while (true) {// 監(jiān)聽并接受客戶的請求 Socket client = ()。 new Connection(sFrame, client, userOnline, v)。 // 支持多線程 }} catch (IOException e) { fail(e, 不能監(jiān)聽!)。 }} public static void main(String args[]) {//啟動服務(wù)器 new AppServer()。 } }//public class Chat implements Serializable{private static final long serialVersionUID = 4058485121419391969L。public String chatUser。 //發(fā)言人用戶名public String chatMessage。 //聊天內(nèi)容public String chatToUser。// 接受對象用戶名public String emote。 //聊天語氣public boolean whisper。// 是否私聊} //public class ChatClient {//設(shè)置服務(wù)器IP地址 public ChatClient() { }public static void main(String args[]) { new Login()。}}//public class ChatRoom extends Thread implements ActionListener { private JComboBox daXiaoComboBox。 private JComboBox yangShiComboBox。 private JComboBox zitiComboBox。 private JComboBox emote。 static JFrame frmChat。 ……………………public ChatRoom(String name, String ip) {// 構(gòu)造方法 String list[] = { 所有人 }。 btnCls = new JButton(清屏(C))。 btnExit = new JButton(退出(X))。btnSend = new JButton(發(fā)送(N))。 btnSave = new JButton(保存(S))。 btnTimer = new JButton(時鐘(T))。 btnBfmusic=new JButton(播放)。 btnXhmusic=new JButton(循環(huán))。 btnTzmusic=new JButton(停止)。 lblUserList = new JLabel(【在線用戶列表】)。 lblUserMessage = new JLabel(【聊天信息】)。 lblSendMessage = new JLabel(聊天內(nèi)容:)。 lblChatUser = new JLabel(你對:)。 lblUserTotal = new JLabel(在線人數(shù):)。 chPrivateChat = new JCheckBox(私聊)?!璸ublic static void main(String args[]) { new ChatRoom(測試用戶, )。 }}// public class Register extends JFrame implements ActionListener{ private JComboBox boBox。 private static final long serialVersionUID = 9019746127517522180L。 …………………… public Register(String ip){//構(gòu)造方法 super(聊天室注冊窗口)。 strServerIp=ip。 pnlRegister=new JPanel()。 ().add(pnlRegister)。 lblUserName=new JLabel(用 戶 名:)。 lblGender=new JLabel(性 別:)。 lblAge=new JLabel(年 齡:)。 lblPassword=new JLabel(口 令:)。 lblConfirmPass=new JLabel(確認(rèn)口令:)。 lblEmail=new JLabel(電子郵件:)。 rbtnMale=new JRadioButton(男,true)。 rbtnFemale=new JRadioButton(女)。 btngGender=new ButtonGroup()。 btnOk=new JButton(確定(O))。 (39。O39。)。 (保存注冊信息)。 btnCancel=new JButton(返回(B))。 (39。B39。)。 (返回登錄窗口)。 btnClear=new JButton(清空(L))。 (39。L39。)。 (清空注冊信息)。public static void main(String args[]) { new Register()
點(diǎn)擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1