Hi I\'m writing a graphics program and I\'ve been searching for a way to get the physical size of the screen being used. I can get the size of the screen in pixels and also
In SWT you can use getShell().getDisplay().getPrimaryMonitor().getClientArea();
final Display display = getShell().getDisplay();
final Monitor monitor = display.getPrimaryMonitor();
final Rectangle rect;
if (monitor != null) {
rect = monitor.getClientArea();
} else {
// In case we cannot find the primary monitor get the entire display rectangle
// Note that it may include the dimensions of multiple monitors.
rect = display.getBounds();
}
System.out.println("Monitor width=" + String.valueOf(rect.width));
System.out.println("Monitor height=" + String.valueOf(rect.height));