java get window size code example Example: how to know width in java int screenHeight = screenSize.height; int screenWidth = screenSize.width;