Consider the below code for getting the Graphics configurations possible on a graphics device. GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getScreenDevices();
+//Assuming here that only one graphic device is supported.+ GraphicsDevice gd = gs; GraphicsConfiguration gc =gd.getConfigurations();
If there are 3 graphics configuration allowed on the device.
Maximum configuration possible is 1st configuration.
Default configuration is 2nd configuration
and the 3rd graphics configuration is set to the device, what should the method Toolkit.getdefaultToolkit().getScreenSize() return ?
According to In Java 2 Platfor SE v14.2, the getScreenSize() definition is
Gets the size of the screen. On systems with multiple displays, the primary display is used. Multi-screen aware displaydimensions are available from GraphicsConfiguration and GraphicsDevice.
The method returns :
a) The dimension of maximum configuration allowed by the device [Here 1280, 720]
b) The dimension of the default configuration [Here 720, 576]
c) The dimension of the current configuration. [Here 960, 540]
Please let me know whether a, b or c is the right one. I am confused on what needs to be implemented ?