- f.addWindowListener(new WindowAdapter() {
- public void windowClosing(WindowEvent e) {
- System.out.println(e.toString());
- System.exit(0);
- }
-
- public void windowActivated(WindowEvent e){
- System.out.println("我活了");
- }
-
- public void windowOpened(WindowEvent e){
- System.out.println("我开了");
- }
- });
复制代码 为什么windowOpened方法没有如何效果?Eclipse和命令行都试过了。 |