Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

screen width

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

public class GetScreenSizeExample2 {
    public static void main(String... args) {

        Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();

        int screenHeight = dimension.height;
        int screenWidth = dimension.width;

        System.out.println("Height: " + screenHeight);
        System.out.println("Width: " + screenWidth);
        
    }
}
Source by simplesolution.dev #
 
PREVIOUS NEXT
Tagged: #screen #width
ADD COMMENT
Topic
Name
9+4 =