📄 windowevent2.java
字号:
import java.awt.*;
import java.awt.event.*;
public class WindowEvent2 extends Frame implements WindowListener{
public WindowEvent2(){
setTitle("扩档快 摧扁 捞亥飘 贸府");
addWindowListener(this);
}
public void windowClosing(WindowEvent e){
CloseFrameDialog d=
new CloseFrameDialog(this,"摧扁","摧栏矫摆嚼聪鳖?");
d.setSize(200,100);
d.setVisible(true);
}
public void windowClosed(WindowEvent e){}
public void windowDeactivated(WindowEvent e){}
public void windowActivated(WindowEvent e){}
public void windowIconified(WindowEvent e){}
public void windowDeiconified(WindowEvent e){}
public void windowOpened(WindowEvent e){}
public static void main(String[] args){
WindowEvent2 me=new WindowEvent2();
me.setSize(200,200);
me.setVisible(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -