亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mainwin.java

?? java聊天室程序
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:

  }
  /**Overridden so we can exit when window is closed*/
  protected void processWindowEvent(WindowEvent e) {//關閉程序
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     //tell who add me as friend offline
     try{
       String whoips;
       String  s="offline"+myjicq;
       s.trim();
       System.out.println(s);
      byte[] data=s.getBytes();
for(int i=0;i<whoaddmesip.size();i++){
     whoips=whoaddmesip.get(i).toString().trim();
        sendPacket=new
        DatagramPacket(data,s.length(),InetAddress.getByName(whoips),sendPort);
             sendSocket.send(sendPacket);//通知好友我下線了
}//for
          } catch(IOException e2){sendtext.append(sendtext.getText());
                 e2.printStackTrace();}
//end offline

//告訴服務器我下線了
     out.println("logout");
     out.println(myjicq);
     //socket.close();
      System.exit(0);

    }
  }
  void this_mousePressed(MouseEvent e) {
 jButton1.setIcon(icon1);
  }

  void list_mouseClicked(MouseEvent e) {
jPopupMenu1.show(this,e.getX()+20,e.getY()+20);
  }

  void direct_mouseClicked(MouseEvent e) {//直接添加好友
 DirectAdd.setLocationRelativeTo(MainWin.this);
 DirectAdd.setSize(260,160);
DirectAdd.show();
// JOptionPane.showMessageDialog(this,":-(對不起,還有好多沒做出來.hg","ok",JOptionPane.INFORMATION_MESSAGE);

  }

  void ok_mouseClicked(MouseEvent e) {
about.dispose();
  }



  void cancel_mouseClicked(MouseEvent e) {
senddata.dispose();
  }

  void sendmessage_mousePressed(MouseEvent e) {//發消息菜單
senddata.setLocationRelativeTo(MainWin.this);
senddata.setBounds(e.getX()+50,e.getY()+50,400,280);
index=list.getSelectedIndex();
System.out.println(index);
nametext.setText(friendnames.get(index).toString());
icqno.setText(friendjicq.get(index).toString());
 theip=friendips.get(index).toString();//ip address
System.out.println(theip);
  senddata.show();

  }

  void find_mouseClicked(MouseEvent e) {//顯示查找好友窗口

findf.show();
}//find

  void send_mouseClicked(MouseEvent e) {//發送消息
//*********send message
    try{
       String s=sendtext.getText().trim();
      // System.out.println(s);
      byte[] data=s.getBytes();
      System.out.println(theip);
      theip.trim();
       if (theip.equals("null")||theip.equals(" ")||theip.equals("0")){JOptionPane.showMessageDialog(this,":-(對不起,不在線","ok",JOptionPane.INFORMATION_MESSAGE);
                                }

      else{
       sendPacket=new
        DatagramPacket(data,s.length(),InetAddress.getByName(theip),sendPort);
             sendSocket.send(sendPacket);}

          } catch(IOException e2){sendtext.append(sendtext.getText());
                 e2.printStackTrace();}
        senddata.dispose();
//*******end send message
  }

  void getmessage_mousePressed(MouseEvent e) {//接受消息菜單
String message=received.trim();
  index=list.getSelectedIndex();
if(index==index4)getinfo.append(message);
else getinfo.append(" ");
getfromname.setText(friendnames.get(index).toString().trim());
getfromjicq.setText(friendjicq.get(index).toString().trim());
getdata.show();
  }

  void getok_mouseClicked(MouseEvent e) {//接受消息 
  getinfo.setText(" ");
getdata.dispose();
received=" ";
  }
//update friend info;
  void update_mouseClicked(MouseEvent e) {//更新好友列表
tempname=findf.tmpname;
tempjicq=findf.tmpjicq;
tempip=findf.tmpip;
temppic=findf.tmppic;
tempstatus=findf.tmpstatus;
tempemail=findf.tmpemail;
tempinfo=findf.tmpinfo;
DefaultListModel mm2=(DefaultListModel)list.getModel();
int picid=0;
for(int p=0;p<tempname.size();p++){
 picid=Integer.parseInt(temppic.get(p).toString());
if(status.get(p).equals("1")){
     mm2.addElement(new Object[]{tempname.get(p),new ImageIcon(picsonline[picid])});}
else {
 mm2.addElement(new Object[]{tempname.get(p),new ImageIcon(picsonline[picid])});}
//picid=Integer.parseInt(temppic.get(p).toString());
//mm2.addElement(new Object[]{tempname.get(p),new ImageIcon(picsonline[picid])});

     }//for
//add to friendlist
for(int k=0;k<tempname.size();k++){
friendnames.add(tempname.get(k));
friendjicq.add(tempjicq.get(k));
friendips.add(tempip.get(k));
picno.add(temppic.get(k));
status.add(tempstatus.get(k));
friendemail.add(tempemail.get(k));
friendinfo.add(tempinfo.get(k));
}//for
//clean tmp
for(int p=0;p<tempname.size();p++){
findf.tmpip.removeAllElements();
findf.tmpjicq.removeAllElements();
findf.tmpname.removeAllElements();
findf.tmppic.removeAllElements();
findf.tmpstatus.removeAllElements();
findf.tmpemail.removeAllElements();
findf.tmpinfo.removeAllElements();
}
}
//delete freind
  void delfriend_mousePressed(MouseEvent e) {//刪除好友
out.println("delfriend");
 int index2;
  index2=list.getSelectedIndex();

out.println(friendjicq.get(index2));//the friendjicq to del
out.println(myjicq);//my jicqno
 DefaultListModel mm=(DefaultListModel)list.getModel();
  mm.removeElementAt(index2);
friendnames.removeElementAt(index2);
  friendips.removeElementAt(index2);
  friendjicq.removeElementAt(index2);
  picno.removeElementAt(index2);
  status.removeElementAt(index2);
  friendemail.removeElementAt(index2);
  friendinfo.removeElementAt(index2);
  }//////////////delfriend
//tell friend i am online
  void online_mouseClicked(MouseEvent e) {
out.println("getwhoaddme");
out.println(myjicq);

   String whoip=" ";
   do{
   try{whoip=in.readLine().trim();
    if(whoip.equals("over"))  break;
    whoaddmesip.add(whoip);
    }catch(IOException s){System.out.println("false getwhoaddme");}
       }while(!whoip.equals("over"));
for(int i=0;i<whoaddmesip.size();i++)
{System.out.println(whoaddmesip.get(i));
}
 try{
       String whoips;
       String  s="online"+myjicq;
       s.trim();
       System.out.println(s);
      byte[] data=s.getBytes();
for(int i=0;i<whoaddmesip.size();i++){
     whoips=whoaddmesip.get(i).toString().trim();
        sendPacket=new
        DatagramPacket(data,s.length(),InetAddress.getByName(whoips),sendPort);
             sendSocket.send(sendPacket);
}//for
          } catch(IOException e2){sendtext.append(sendtext.getText());
                 e2.printStackTrace();System.exit(1);}

}/////end tellfrienonline

  void myinfo_mouseClicked(MouseEvent e) {//陌生人消息 
if(fromunknow){
String message=received.trim();
getinfo.append(message);
getdata.show();
}

  }

  void lookinfo_mousePressed(MouseEvent e) {//查看好友資料菜單
hello.setLocationRelativeTo(MainWin.this);
hello.setBounds(e.getX()+50,e.getY()+50,380,300);
  index=list.getSelectedIndex();
helloname.setText(friendnames.get(index).toString());
hellojicq.setText(friendjicq.get(index).toString());
helloemail.setText(friendemail.get(index).toString());
helloinfo.setText(friendinfo.get(index).toString().trim());
hello.show();
  }

  void hellook_mouseClicked(MouseEvent e) {//查看好友資料關閉
hello.dispose();
  }
//add the one who add me as friend
  void addit_mouseClicked(MouseEvent e) {
//如果有人加我,我就加它
 out.println("addnewfriend");
out.println(tempgetjicq);
out.println(myjicq);
 String thename=" ";
try{
        String thejicqno,theip,thestatus,picinfo,email,infos;
        do{thename=in.readLine();
            if(thename.equals("over"))  break;
            friendnames.add(thename);
           thejicqno=in.readLine();
            friendjicq.add(new Integer(thejicqno));
           theip=in.readLine();
            friendips.add(theip);
         thestatus=in.readLine();
          status.add(thestatus);
          picinfo=in.readLine();
          picno.add(new Integer(picinfo));
          email=in.readLine();
          friendemail.add(email);
          infos=in.readLine();
         friendinfo.add(infos);
          }while(!thename.equals("over"));
 }catch(IOException e1){System.out.println("false");}
int dddd=friendnames.size()-1;
DefaultListModel mm2=(DefaultListModel)list.getModel();
int picid;
picid=Integer.parseInt(picno.get(dddd).toString());
mm2.addElement(new Object[]{friendnames.get(dddd),new ImageIcon(picsonline[picid])});
  }

  void iknow_mouseClicked(MouseEvent e) {
OneAddyou.dispose();
  }

  void directaddok_mouseClicked(MouseEvent e) {//直接添加好友
 out.println("addnewfriend");
out.println(friendid.getText().trim());
out.println(myjicq);
 String thename=" ";
try{
        String thejicqno,theip,thestatus,picinfo,email,infos;
        do{thename=in.readLine();
            if(thename.equals("over"))  break;
            friendnames.add(thename);
           thejicqno=in.readLine();
            friendjicq.add(new Integer(thejicqno));
           theip=in.readLine();
            friendips.add(theip);
         thestatus=in.readLine();
          status.add(thestatus);
          picinfo=in.readLine();
          picno.add(new Integer(picinfo));
          email=in.readLine();
          friendemail.add(email);
          infos=in.readLine();
         friendinfo.add(infos);
          }while(!thename.equals("over"));
 }catch(IOException e1){System.out.println("false");}
int dddd=friendnames.size()-1;
DefaultListModel mm2=(DefaultListModel)list.getModel();
int picid;
picid=Integer.parseInt(picno.get(dddd).toString());
mm2.addElement(new Object[]{friendnames.get(dddd),new ImageIcon(picsonline[picid])});
 DirectAdd.dispose();
  };//end directadd friend

}//end class MainWin
//以下繼承DefaultListModel類以創建好友列表
class NameAndPicListModel extends DefaultListModel
      {   public NameAndPicListModel(Vector friendnames,String [] pics)
          { for(int i=0;i<friendnames.size();++i){
          addElement(new Object[]{friendnames.get(i),new ImageIcon(pics[i])});
          }
          }
  public  String getName(Object object)
  { Object[] array=(Object[])object;
  return(String) array[0];
  }
public Icon getIcon(Object object)
{ Object[] array=(Object[]) object;
  return (Icon) array[1];
  }
}
  class NameAndPicListCellRenderer extends JLabel implements ListCellRenderer
{ private Border lineBorder=BorderFactory.createLineBorder(Color.red,2),
           emptyBorder =BorderFactory.createEmptyBorder(2,2,2,2);
  public NameAndPicListCellRenderer(){
     setOpaque(true);
     }
public Component getListCellRendererComponent(JList list,Object value,int index,
                                                boolean isSelected,boolean cellHasFocus)
      { NameAndPicListModel model=(NameAndPicListModel) list.getModel();
        setText(model.getName(value));
        setIcon(model.getIcon(value));
        if(isSelected){setForeground(list.getSelectionForeground());
                         setBackground(list.getSelectionBackground());
                         }
          else { setForeground(list.getForeground());
                   setBackground(list.getBackground());}
          if(cellHasFocus) setBorder(lineBorder);
                else setBorder(emptyBorder);
          return this;
          }
          }

class MainWin_list_mouseAdapter extends java.awt.event.MouseAdapter {
  MainWin adaptee;
  MainWin_list_mouseAdapter(MainWin adaptee) {
    this.adaptee = adaptee;
  }
  public void mouseClicked(MouseEvent e) {
    adaptee.list_mouseClicked(e);
  }
}

class MainWin_direct_mouseAdapter extends java.awt.event.MouseAdapter {
  MainWin adaptee;

  MainWin_direct_mouseAdapter(MainWin adaptee) {
    this.adaptee = adaptee;
  }
  public void mouseClicked(MouseEvent e) {
    adaptee.direct_mouseClicked(e);
  }
}

class MainWin_ok_mouseAdapter extends java.awt.event.MouseAdapter {
  MainWin adaptee;

  MainWin_ok_mouseAdapter(MainWin adaptee) {
    this.adaptee = adaptee;
  }
  public void mouseClicked(MouseEvent e) {
    adaptee.ok_mouseClicked(e);
  }
}

class MainWin_sendmessage_mouseAdapter extends java.awt.event.MouseAdapter {
  MainWin adaptee;

  MainWin_sendmessage_mouseAdapter(MainWin adaptee) {
    this.adaptee = adaptee;
  }

  public void mousePressed(MouseEvent e) {
    adaptee.sendmessage_mousePressed(e);
  }
}

class MainWin_cancel_mouseAdapter extends java.awt.event.MouseAdapter {
  MainWin adaptee;

  MainWin_cancel_mouseAdapter(MainWin adaptee) {
    this.adaptee = adaptee;
  }
  public void mouseClicked(MouseEvent e) {
    adaptee.cancel_mouseClicked(e);
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区精品视频| 亚洲精品伦理在线| 91污片在线观看| 天天影视网天天综合色在线播放| 精品成人在线观看| 欧美制服丝袜第一页| 国产一区福利在线| 无吗不卡中文字幕| 综合亚洲深深色噜噜狠狠网站| 9191久久久久久久久久久| 高清国产一区二区三区| 免费亚洲电影在线| 亚洲国产精品人人做人人爽| 国产欧美在线观看一区| 555www色欧美视频| 91免费看`日韩一区二区| 精品影视av免费| 日韩成人精品在线| 一区二区三区四区五区视频在线观看| 2022国产精品视频| 91精品国产综合久久蜜臀| 色哟哟国产精品| 粉嫩绯色av一区二区在线观看| 日本美女视频一区二区| 亚洲一二三四在线观看| 中国av一区二区三区| 久久综合狠狠综合久久综合88| 欧美美女喷水视频| 在线视频一区二区三| 不卡的av电影| 成人天堂资源www在线| 国产一区二区影院| 狠狠色伊人亚洲综合成人| 日精品一区二区三区| 亚洲国产精品一区二区www在线| 亚洲欧美日韩电影| 成人免费在线视频| 中文字幕一区二区三区蜜月 | 26uuu亚洲| 欧美一级免费观看| 4438成人网| 欧美乱妇一区二区三区不卡视频| 91成人免费在线视频| 一本到不卡精品视频在线观看| 不卡一区二区中文字幕| 亚洲美女视频一区| 精品视频在线免费观看| 国产一区不卡视频| 亚洲综合激情另类小说区| 精品久久久久久最新网址| 99久久精品国产毛片| 不卡av免费在线观看| 国产欧美中文在线| 成人一区二区在线观看| 欧美精品亚洲一区二区在线播放| 91麻豆福利精品推荐| 国产精品99久久久久久有的能看 | 欧美日韩国产电影| 成熟亚洲日本毛茸茸凸凹| 久久九九99视频| 丰满岳乱妇一区二区三区| 午夜免费久久看| 亚洲欧美精品午睡沙发| 国产欧美va欧美不卡在线| 在线播放亚洲一区| 欧美性猛交xxxx乱大交退制版| 成人av第一页| 国产老妇另类xxxxx| 欧美放荡的少妇| 欧美xxxx老人做受| 亚洲欧美日韩电影| 成人午夜av在线| 日韩精品最新网址| 欧美变态tickling挠脚心| 欧美成人精品二区三区99精品| 欧美一区二区免费视频| 综合av第一页| 一区二区三区欧美日韩| 美女诱惑一区二区| av一区二区三区四区| 欧美日韩五月天| 欧美一级高清片| 久久婷婷国产综合精品青草 | 欧美影视一区在线| 欧美日韩一区二区三区四区五区| 91亚洲精华国产精华精华液| 国产91对白在线观看九色| 舔着乳尖日韩一区| 国产精品自拍毛片| 理论片日本一区| 在线看日韩精品电影| 国产丝袜欧美中文另类| 亚洲综合精品自拍| 久久se精品一区精品二区| 国产一二三精品| 日韩欧美在线网站| 中文字幕av免费专区久久| 亚洲国产毛片aaaaa无费看| 日韩一卡二卡三卡四卡| 亚洲一区二区三区四区五区黄 | 色婷婷综合久色| 日韩一区二区电影网| 欧美激情一区二区三区| 亚洲一区二区av电影| 国产麻豆一精品一av一免费| 在线精品视频小说1| 国产丝袜欧美中文另类| 老司机午夜精品| 欧美亚洲高清一区| 中文字幕中文字幕中文字幕亚洲无线 | 成人av网址在线| 欧美一区二区黄| 一区二区三国产精华液| 国产a视频精品免费观看| 欧美一级片在线| 午夜久久久久久久久| 99精品视频一区二区三区| 久久久久99精品一区| 日本午夜一本久久久综合| 欧美亚洲一区二区三区四区| 中文乱码免费一区二区| 精品中文字幕一区二区| 91精品国产综合久久精品图片| 亚洲视频1区2区| 91美女在线观看| 中文字幕一区在线观看视频| 久草在线在线精品观看| 这里只有精品电影| 午夜视频在线观看一区二区| 91麻豆福利精品推荐| 1区2区3区国产精品| 不卡欧美aaaaa| 国产精品国产三级国产专播品爱网| 国产乱码精品1区2区3区| 精品区一区二区| 狠狠色狠狠色综合日日91app| 欧美成人精品福利| 国产一区久久久| 国产日韩欧美亚洲| 国产高清成人在线| 中文字幕免费不卡| 成人激情免费视频| 国产精品区一区二区三区| 成人激情黄色小说| 亚洲欧美视频一区| 日本道精品一区二区三区| 亚洲欧美日韩国产手机在线| 色天天综合久久久久综合片| 亚洲免费av网站| 欧美日韩久久一区| 日韩av一二三| 亚洲精品一区二区三区香蕉| 国产精品亚洲一区二区三区妖精 | 欧美二区在线观看| 国产欧美一区二区在线观看| 国产精品影音先锋| 欧美高清在线一区| 成人午夜免费av| 日韩欧美123| 国产一区不卡在线| 国产精品进线69影院| 色综合久久久久综合| 亚洲五码中文字幕| 欧美一级二级三级蜜桃| 国产乱对白刺激视频不卡| 一色桃子久久精品亚洲| 91传媒视频在线播放| 日本va欧美va欧美va精品| 精品国产乱码久久久久久闺蜜| 国产成人综合网站| 亚洲精品成人精品456| 91麻豆精品国产91久久久资源速度| 久久精品国产一区二区三| 日本一区二区三区免费乱视频| 色婷婷激情综合| 精品在线一区二区三区| 中文字幕中文乱码欧美一区二区| 欧美探花视频资源| 狠狠色狠狠色综合日日91app| 日韩黄色在线观看| 欧美国产精品专区| 欧美日韩视频在线观看一区二区三区| 美国十次了思思久久精品导航| 欧美国产成人在线| 欧美日韩一本到| 国产成人在线视频播放| 亚洲午夜在线电影| 久久亚洲精华国产精华液| 日本黄色一区二区| 国内精品伊人久久久久av影院| 亚洲欧美在线aaa| 日韩一区二区电影在线| 91在线高清观看| 韩国一区二区三区| 亚洲综合在线免费观看| 久久久精品中文字幕麻豆发布| 欧美日韩国产a| 成人免费视频caoporn| 免费高清成人在线| 一区二区三区在线播放|