Screen sc = Screen.getPrimary();//获取屏幕的主要信息
System.out.println(sc);
System.out.println("------------");
Rectangle2D bounds = sc.getBounds();//获得全部屏幕的高度
System.out.println(bounds.getMinX() +" "+ bounds.getMaxX());
Rectangle2D vbounds = sc.getVisualBounds();//获得可视屏幕的高度
System.out.println(vbounds);
网友评论