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

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

?? mainwin.java

?? 基于JAVA的ICQ系統 具體操作
?? 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灌醉迷j高跟美女| 国产精品久久久久一区二区三区共| 欧美xxxx在线观看| 1000部国产精品成人观看| 日韩成人午夜精品| 一本色道久久综合精品竹菊| 精品国产乱码久久久久久老虎| 亚洲欧美一区二区在线观看| 国产在线精品一区二区夜色| 欧美丝袜自拍制服另类| 国产精品女人毛片| 国产在线精品一区二区夜色 | 久久精品欧美日韩| 亚洲h精品动漫在线观看| 成人精品鲁一区一区二区| 91精品综合久久久久久| 亚洲综合免费观看高清在线观看 | 亚洲国产精品久久久久秋霞影院 | 国产精品一区二区三区乱码| 欧美精品一级二级三级| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 91麻豆精品国产91久久久更新时间 | 国产精品视频一二| 极品少妇一区二区| 日韩一级大片在线观看| 日韩成人午夜电影| 538在线一区二区精品国产| 亚洲综合在线第一页| 99精品视频在线免费观看| 国产精品丝袜一区| jiyouzz国产精品久久| 中文字幕免费不卡| 成人18视频日本| 国产精品日韩成人| 99久久99精品久久久久久| 成人免费一区二区三区视频 | 香蕉av福利精品导航| 色天使久久综合网天天| 亚洲一区二区在线免费观看视频 | av电影在线观看一区| 欧美激情一二三区| www.性欧美| 亚洲人精品午夜| 日本精品免费观看高清观看| 一区二区三区精品视频在线| 欧美三日本三级三级在线播放| 亚洲网友自拍偷拍| 欧美一区二区三区免费大片| 麻豆视频观看网址久久| 久久精品男人的天堂| 99久久精品久久久久久清纯| 亚洲免费看黄网站| 欧美美女直播网站| 黄页视频在线91| 国产精品青草久久| 91久久线看在观草草青青| 日韩国产精品91| 久久色视频免费观看| 97成人超碰视| 香蕉成人伊视频在线观看| 精品粉嫩aⅴ一区二区三区四区| 国产成人免费av在线| 亚洲色图.com| 日韩一区二区电影网| 国产a级毛片一区| 亚洲午夜精品17c| 久久综合成人精品亚洲另类欧美 | 久久av资源网| 中文字幕不卡在线| 欧美精品在线一区二区| 高清免费成人av| 天天综合天天做天天综合| 久久久久久久久伊人| 色婷婷综合久久久中文一区二区| 男男gaygay亚洲| 国产精品护士白丝一区av| 51精品国自产在线| 成人激情图片网| 久久精品久久久精品美女| 亚洲视频一区二区在线| 日韩精品中文字幕一区二区三区 | 日本不卡视频在线观看| 国产精品正在播放| 亚洲一二三区不卡| 国产精品久久久久影院老司| 91精品国产一区二区三区香蕉| 成人动漫一区二区| 理论片日本一区| 亚洲综合色在线| 国产精品久久久99| 久久一夜天堂av一区二区三区| 欧美视频三区在线播放| 丁香六月久久综合狠狠色| 老司机免费视频一区二区三区| 亚洲美女免费视频| 国产日韩精品一区二区三区在线| 欧美区视频在线观看| 色88888久久久久久影院按摩| 国产精品亚洲第一| 久久99精品国产麻豆婷婷洗澡| 午夜精品福利一区二区蜜股av| 亚洲欧洲综合另类| 国产精品三级av在线播放| 久久精品欧美一区二区三区不卡 | 色呦呦国产精品| 不卡在线观看av| 粉嫩高潮美女一区二区三区| 精品亚洲国内自在自线福利| 日本怡春院一区二区| 亚洲 欧美综合在线网络| 一区二区视频免费在线观看| 亚洲日本va在线观看| 中文字幕在线观看一区二区| 欧美激情一区二区三区| 中文字幕的久久| 中文字幕一区二区三区四区不卡| 中文字幕精品一区二区三区精品| 国产亚洲va综合人人澡精品| 久久久久久久一区| 国产欧美一区二区三区鸳鸯浴 | 18成人在线观看| 亚洲精品老司机| 一级特黄大欧美久久久| 一区二区成人在线| 视频一区二区三区在线| 强制捆绑调教一区二区| 毛片一区二区三区| 国产精品自在在线| 成人免费看片app下载| 91小宝寻花一区二区三区| 色婷婷综合激情| 69堂亚洲精品首页| 精品国产伦一区二区三区观看方式| 精品久久久久一区二区国产| 国产日韩精品一区二区三区| 中文字幕精品一区二区精品绿巨人| 亚洲日本乱码在线观看| 亚洲国产精品一区二区久久| 免费看日韩a级影片| 国产成人av一区| 一本到不卡免费一区二区| 在线不卡中文字幕播放| 久久亚洲影视婷婷| 亚洲少妇最新在线视频| 图片区小说区国产精品视频 | 亚洲国产欧美在线| 日韩中文字幕亚洲一区二区va在线 | 高清成人免费视频| 91麻豆国产福利在线观看| 欧美日韩精品一二三区| 久久亚洲一区二区三区四区| 亚洲视频一区二区在线观看| 日本不卡在线视频| www.欧美日韩国产在线| 这里只有精品视频在线观看| 久久精品免视看| 亚洲国产裸拍裸体视频在线观看乱了 | 亚洲人成精品久久久久| 麻豆中文一区二区| 91在线精品一区二区三区| 欧美一区二区三区白人| 国产精品久久久久aaaa| 日韩精品每日更新| av男人天堂一区| 日韩欧美一级二级三级久久久| 亚洲视频一区二区免费在线观看| 蜜桃一区二区三区四区| 在线中文字幕不卡| 国产欧美日韩卡一| 蜜臀久久99精品久久久久久9| 91美女在线观看| 国产日产欧美一区二区三区| 日韩av电影天堂| 91电影在线观看| 亚洲视频狠狠干| 成人综合婷婷国产精品久久蜜臀| 91精品国产综合久久久久久漫画| 亚洲人xxxx| www.在线欧美| 国产精品三级在线观看| 国产乱子伦视频一区二区三区 | 日韩欧美国产wwwww| 亚洲国产综合91精品麻豆| www.亚洲在线| 国产精品免费看片| 国产成人亚洲综合色影视| 日韩精品在线一区二区| 日本欧美一区二区| 在线视频国产一区| 亚洲欧美aⅴ...| 色综合久久中文综合久久牛| 亚洲国产精品成人综合| 国产成人在线视频网站| 久久综合久久综合久久综合| 免费成人av在线播放| 欧美一级国产精品| 青青草原综合久久大伊人精品 | 五月天欧美精品| 欧美日韩一区二区三区高清 | 91精品国产91久久久久久一区二区|