📄 windoweventtest.java
字号:
import java.awt.*;
import java.awt.event.*;
public class WindowEventTest extends Frame implements WindowListener{
public WindowEventTest()
{
addWindowListener(this);
}
public static void main(String args[]){
WindowEventTest test=new WindowEventTest();
//test.addWindowListener(test);//自己设置自己一个WindowListener组件
test.setSize(300,200);
test.setVisible(true);
}
public void windowActivated(WindowEvent e)
{
}
public void windowClosed(WindowEvent e)
{
}
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
public void windowDeactivated(WindowEvent e)
{
}
public void windowDeiconified(WindowEvent e)
{
}
public void windowIconified(WindowEvent e)
{
}
public void windowOpened(WindowEvent e)
{
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -