get screen heightjava code example
Example 1: java get screen size
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
// the screen height
screenSize.getHeight();
// the screen width
screenSize.getWidth();
Example 2: how to know width in java
int screenHeight = screenSize.height;
int screenWidth = screenSize.width;