📄 frame1.java
字号:
/**
* Frame1.java
*
* Description:
* @author John A. Crease
* @version
*/
package Physics3D;
import java.awt.*;
import java.awt.event.*;
public class Frame1 extends java.awt.Frame {
// IMPORTANT: Source code between BEGIN/END comment pair will be regenerated
// every time the form is saved. All manual changes will be overwritten.
// BEGIN GENERATED CODE
// member declarations
// END GENERATED CODE
public Frame1() {
}
public void initComponents() throws Exception {
// IMPORTANT: Source code between BEGIN/END comment pair will be regenerated
// every time the form is saved. All manual changes will be overwritten.
// BEGIN GENERATED CODE
// the following code sets the frame's initial state
setLayout(null);
setLocation(new java.awt.Point(0, 0));
setTitle("Physics3D.Frame1");
setSize(new java.awt.Dimension(358, 477));
// event handling
addComponentListener(new java.awt.event.ComponentAdapter() {
public void componentMoved(java.awt.event.ComponentEvent e) {
thisComponentMoved(e);
}
});
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
thisWindowClosing(e);
}
});
// END GENERATED CODE
}
private boolean mShown = false;
public void addNotify() {
super.addNotify();
if (mShown)
return;
// move components to account for insets
Insets insets = getInsets();
Component[] components = getComponents();
for (int i = 0; i < components.length; i++) {
Point location = components[i].getLocation();
location.move(location.x, location.y + insets.top);
components[i].setLocation(location);
}
mShown = true;
}
// Close the window when the close box is clicked
void thisWindowClosing(java.awt.event.WindowEvent e) {
setVisible(false);
dispose();
System.exit(0);
}
public void thisComponentMoved(java.awt.event.ComponentEvent e) {
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -