Skip to main content

Screen

Complete API reference for Screen, including constructors, attributes, virtual attributes, and methods.

Package: JAVARuntime

Category: Platform

Component: no


public class Screen

Static Methods

SignatureReturnsDescription
getWidth()intReturns the screen width in pixels.
getHeight()intReturns the screen height in pixels.
width()intReturns the screen width in pixels.
height()intReturns the screen height in pixels.
ratio()floatReturns the aspect ratio of the screen (width divided by height).