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
You can try to use:
Dimension screen = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
int pixelPerInch= java.awt.Toolkit.getDefaultToolkit().getScreenResolution();
double height=screen.getHeight()/pixelPerInch;
double width=screen.getWidth()/pixelPerInch;
double x=Math.pow(height,2);
double y=Math.pow(width,2);
double diagonal= Math.sqrt(x+y);
The "diagonal" value is in inches.