code.dreamsense.com

Determine Screen Size

  import java.awt.*;

  public class Test {
    public static void main(String[] args) {
      Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
      System.out.println(screenSize.getHeight());
      System.out.println(screenSize.getWidth());
    }
  }

Kyle Eggleston
kyle@dreamsense.com
Copyright © 2003 - 2020