I need a function that gives me the resolutions of my individual monitors.
I do know that Toolkit.getDefaultToolkit().getScreenSize()
gives me the cumulative resolution of all monitors, but to limit the size of some frames I draw I want to know the resolutions of the individual screens.
I tried using GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()
which returns an array of all screens, but I could not find any resolution information in there.
The header of the function should be something like
/**
* Returns the Dimension of all available screen devices in order of appearance in
* GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()
*
* @return the Dimensions of all available screen devices.
*/
public Dimension[] getScreenResolutions() {
[ . . . ]
}