package com.sinosuperman.driver;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;
public class MainBench {
public static void main(String[] args) {
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
Rectangle rec = env.getMaximumWindowBounds();
System.out.println("Rectangle: " + rec);
System.out.println("Rectangle center x: " + rec.getCenterX());
System.out.println("Rectangle center y: " + rec.getCenterY());
System.out.println("Environment center point: " + env.getCenterPoint());
System.out.println("Environment center point x: " + env.getCenterPoint().getX());
System.out.println("Environment center point y: " + env.getCenterPoint().getY());
}
}
Java GUI之GraphicsEnvironment
最新推荐文章于 2024-04-13 09:39:23 发布