?? myframewithexithandling.java
字號:
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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -