// java - get screen size using the Toolkit class Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();