标签:
1、代码:
java.awt.Toolkit tk=java.awt.Toolkit.getDefaultToolkit();
java.awt.Dimension screenSize=tk.getScreenSize();
int screenWidth=screenSize.width;
//System.out.println(screenWidth);//1440
int screenHeight=screenSize.height;
//System.out.println(screenHeight);//900
简化:
Dimension screen=Toolkit.getDefaultToolkit().getScreenSize();
System.out.println(screen.width);
标签:
原文地址:http://www.cnblogs.com/yichjin/p/5647380.html