Java使窗口最小化为图标
来源:优易学  2010-1-15 12:31:09   【优易学:中国教育考试门户网】   资料下载   IT书店

 

  mi2.addActionListener(new ActionListener(){

  public void actionPerformed(ActionEvent e) {

  // TODO Auto-generated method stub

  //System.out.println("close");

  //System.exit(0);

  }

  });

  st = new TrayIcon(image, "Tray Demo", popup);

  try {

  tray.add(st);

  } catch (AWTException e) {

  e.printStackTrace();

  }

  }

  }

  public static void main(String[] args) {

  new SystemTrayTest().start();

  }

  }

  //使窗口最小化,并隐藏

  public void windowIconified(WindowEvent e) {

  System.out.print("sssssss");

  jf.setVisible(false);

  System.out.print(""+e+" "+e.getClass()+" "+e.getNewState());

  }

上一页  [1] [2] [3] 

责任编辑:cyth

文章搜索:
 相关文章
热点资讯
资讯快报
热门课程培训