Getting the Screen Size : Toolkit « Development « Java Tutorial






import java.awt.Dimension;
import java.awt.Toolkit;

public class Main {
  public static void main(String[] argv) throws Exception {
    Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
    System.out.println(dim);
  }
}








6.25.Toolkit
6.25.1.java.awt.Toolkit
6.25.2.Getting the Screen Size
6.25.3.Centering a Frame, Window, or Dialog on the Screen