Yes, i am looking for the resolution, not the screen size. when i run that code it only returns 96 no matter what i make the resolution. Is there a way to get the current resolution being used. eg: 1280 by 720?
I checked it with my resolution as 1280 * 1204. Screen Size's width was returned as 1280 and height was returned as 1204.
I changed my resolution to 1280 * 800. Screen Size's width was returned as 1280 and height was returned as 800.
Maneesh Godbole wrote:Screen size and screen resolution are two different things.
Size refers to the well size of your monitor
Resolution will give you the density of the pixels.I think it is dots per inch (dpi)
The Toolkit class has methods for retrieving both these parameters.
Lila Fowler, the answer provided by Oleg Tikhonov is correct, have you tried that?
Joined: Jul 31, 2009
I just finished trying it, thanks it works great, but now im really confused because i thought that getScreenSize returned the actual measurements of the screen itself. Sorry, Thanks for all your help.
Karthick Dharani Vidhya
Joined: Feb 23, 2008
Yes. It does return the size of the screen. BUT NOT THE PHYSICAL SIZE.
It returns you the PIXEL SIZE OF THE SCREEN. Like 1024 * 768. You can accomodate these many number of pixels in this screen.
Obviously, when your resolution changes, the number of pixels that you can accomodate (i.e the size) changes
Lila Fowler wrote:I just finished trying it, thanks it works great, but now im really confused because i thought that getScreenSize returned the actual measurements of the screen itself. Sorry, Thanks for all your help.
Do you mean Monitor size like 15inch or 17inch ?
I confess i do not know how that can be achieved, and i am curious to why do you require that info..