< prev index next >

test/jdk/java/awt/Multiscreen/WindowGCChangeTest/WindowGCChangeTest.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -20,49 +20,38 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
 /*
-  test
+  @test
+  @key headful
   @bug 4868278
-  @summary Tests that GraphicsConfig for invisible (peerless) window is
+  @summary Tests that GraphicsConfig for invisible (peerless) windows is
    updated after showing the window
-  @author artem.ananiev, area=awt.multiscreen
   @library ../../regtesthelpers
   @build Util
-  @run applet WindowGCChangeTest.html
+  @run main WindowGCChangeTest
 */
 
-import java.applet.Applet;
-
 import java.awt.*;
 import java.awt.event.*;
 
 import test.java.awt.regtesthelpers.Util;
 
-public class WindowGCChangeTest extends Applet
-{
-    public void init()
-    {
-    }
+public class WindowGCChangeTest {
 
-    public void start()
-    {
+    public static void main(final String[] args) {
         Robot robot = null;
         try
         {
             robot = new Robot();
         }
         catch (Exception z)
         {
             z.printStackTrace(System.err);
             throw new RuntimeException("Test FAILED: couldn't create Robot instance", z);
         }
-
-        setSize(200, 200);
-        setVisible(true);
-        validate();
         Util.waitForIdle(robot);
 
         GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
         GraphicsDevice[] gds = ge.getScreenDevices();
         // check 2-screens systems only
< prev index next >