标签:io java on c ef size r 设计 tt
默认情况下,框架在screen左上角显示,坐标(0,0)改变其位置eg.
//得到screen的宽和高,java.awt.Toolkit
Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
int screenWidth=screenSize.width;
int screenHeight=screenSize.height;
//框架frame的左上角坐标
int x=(screenWidth-frame.getWidth())/2;
itn y=(screenHeight-frame.getHeight())/2;
标签:io java on c ef size r 设计 tt
原文地址:http://www.cnblogs.com/fly-33/p/3987924.html