public class Screen extends Object
getScreen()method; it you want the width and height of the screen your Window is on, you're in the right place.
A Screen is typically one monitor, but could actually be more; it depends on how your X server is configured. A Display, in turn, is made up of one or more Screens; again it depends.
With the advent of the
XINERAMA extension in the
XFree and later X.org X Windows servers, you tend to find that
what would have been multiple Screens have been (transparently) merged and
stretched to run over an entire multi-headed Display. This works out better
(single mouse and keyboard works over the entire desktop, as does cut and
paste, dragging, etc) and since the window manager is aware of the
situation, it can maximize Windows properly to be only on one physical
screen as you'd expect and desire.
As a result, the distinction between Screen and Display is nowadays somewhat blurred. In practise you can treat them synonymously especially since their methods don't overlap. Frankly, this is all another classic case of "don't second guess the window manager"; just let it do it's job and leave the Window placement alone.
X(7) man page on your system
|Modifier and Type||Method and Description|
Get the vertical height of this Screen, in pixels.
Get the horizontal width of this Screen, in pixels.