📄 closeabletest.java
字号:
/**
* @version 1.20 21 Jun 1998
* @author Cay Horstmann
*/
import java.awt.event.*;
import javax.swing.*;
class CloseableFrame extends JFrame
{ public CloseableFrame()
{ setTitle("CloseableFrame");
setSize(300, 200);
addWindowListener(new WindowAdapter()
{ public void windowClosing(WindowEvent e)
{ System.exit(0);
}
} );
}
}
public class CloseableTest
{ public static void main(String[] args)
{ JFrame frame = new CloseableFrame();
frame.show();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -