lawpan
asked on
How to known if OS is running more than 1 monitor.
I have two monitors. I am running an application in the second monitor and saves cordinates in a file. When I move the application to another computer that only have 1 monitor the window is not visible due to location outside the monitor.
Dimension screenSize = Toolkit.getDefaultToolkit( ).getScree nSize();
gets me 1600x1200
But my windows is located lets say 1680x150 and not visible.
I could remove 1600 from the 1680 automatically. But I want to support more monitors.
There is a method
Toolkit.getDefaultToolkit( ).getDeskt opProperty (StringPop ertyName);
Does anyone know what property I should look for?
Or some way to ask the OS number of monitors etc.
Dimension screenSize = Toolkit.getDefaultToolkit(
gets me 1600x1200
But my windows is located lets say 1680x150 and not visible.
I could remove 1600 from the 1680 automatically. But I want to support more monitors.
There is a method
Toolkit.getDefaultToolkit(
Does anyone know what property I should look for?
Or some way to ask the OS number of monitors etc.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oops, a typo! Should be GraphicsEnvironment instead of GraphiceEnvironment.
Sorry!
Sorry!
ASKER
Thank you very much. This was what I was looking for.
ASKER
Thank you very much. This was what I was looking for.
http://java.sun.com/j2se/1.3/docs/guide/awt/enhancements.html
They tell you how to support more than one monitor.
I will look for a solution working in Swing. Stay tuned.