📄 paintbox.java
字号:
/*
* PaintBox.java
*
* Created on 2007年4月23日, 下午11:55
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package paintbox;
/**
*
* @author fly
*/
import java.awt.event.*;
import java.awt.*;
public class PaintBox {
/** Creates a new instance of PaintBox */
public PaintBox() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
PaintBoxFrame frame = new PaintBoxFrame ();
//以下使窗口显示在屏幕的中央
frame.pack ();
Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
int screenWidth=screenSize.width;
int screenHeight=screenSize.height;
Dimension frameSize=frame.getSize();
int frameWidth=frameSize.width;
int frameHeight=frameSize.height;
int x=(screenWidth-frameWidth)/2;
int y=(screenHeight-frameHeight)/2;
frame.setLocation(x,y);
frame.setVisible (true);
frame.setResizable (false);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -