myframewithexithandling.java
来自「简单T9输入法模拟」· Java 代码 · 共 53 行
JAVA
53 行
import java.awt.*;
import java.awt.event.*;
public class MyFrameWithExitHandling extends Frame
implements WindowListener
{
public MyFrameWithExitHandling(String str)
{
super(str);
addWindowListener(this);
}
public MyFrameWithExitHandling()
{
super();
addWindowListener(this);
}
public void windowClosed(WindowEvent event)
{
}
public void windowDeiconified(WindowEvent event)
{
}
public void windowIconified(WindowEvent event)
{
}
public void windowActivated(WindowEvent event)
{
}
public void windowDeactivated(WindowEvent event)
{
}
public void windowOpened(WindowEvent event)
{
}
public void windowClosing(WindowEvent event)
{
dispose();
System.exit(0);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?