Lesson6 screen类 //获取屏幕信息

2019-05-12  本文已影响0人  大丰87
    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);
上一篇 下一篇

猜你喜欢

热点阅读