File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
test/jdk/java/awt/GraphicsDevice Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,13 @@ public class CheckDisplayModes {
35
35
36
36
public static void main (String [] args ) {
37
37
GraphicsEnvironment ge = GraphicsEnvironment .getLocalGraphicsEnvironment ();
38
- for (GraphicsDevice gd : ge .getScreenDevices ()) {
38
+ GraphicsDevice [] allDevices = ge .getScreenDevices ();
39
+
40
+ for (GraphicsDevice gd : allDevices ) {
39
41
System .out .println ("Available screen device: " + gd .getIDstring ());
40
42
}
41
43
42
- for (GraphicsDevice graphicDevice : ge . getScreenDevices () ) {
44
+ for (GraphicsDevice graphicDevice : allDevices ) {
43
45
System .out .println ("On screen device " + graphicDevice .getIDstring ());
44
46
if (!graphicDevice .isDisplayChangeSupported ()) {
45
47
System .err .println ("Display mode change is not supported on this host. Test is considered passed." );
You can’t perform that action at this time.
0 commit comments