📄 dlgcenterlization.java
字号:
import java.awt.Frame;
public class DlgCenterlization extends Frame
{
//对话框居中
//Frame parent = new Frame();
//parent.getParent();
public DlgCenterlization(AddressBook parent)
{
int x = parent.getLocation().x + (parent.getSize().width - getSize().width) / 2;
int y = parent.getLocation().y + (parent.getSize().height - getSize().height) / 2;
x = Math.min(getToolkit().getScreenSize().width - getSize().width, x);
y = Math.min(getToolkit().getScreenSize().height - getSize().height, y);
setLocation(Math.max(0, x), Math.max(0, y));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -