test/jdk/java/awt/Focus/ChildWindowFocusTest/ChildWindowFocusTest.java
changeset 54231 e4813eded7cb
parent 50834 9cf279436b9d
--- a/test/jdk/java/awt/Focus/ChildWindowFocusTest/ChildWindowFocusTest.java	Wed Feb 27 14:30:08 2019 -0800
+++ b/test/jdk/java/awt/Focus/ChildWindowFocusTest/ChildWindowFocusTest.java	Wed Feb 27 18:46:55 2019 -0800
@@ -22,19 +22,17 @@
  */
 
 /*
-  test
+  @test
+  @key headful
   @bug        5090325
   @summary    Tests that Window's child can be focused on XAWT.
-  @author     anton.tarasov@sun.com: area=awt.focus
-  @run        applet ChildWindowFocusTest.html
+  @run        main ChildWindowFocusTest
 */
 
 import java.awt.*;
 import java.awt.event.*;
-import java.applet.Applet;
-import java.lang.reflect.*;
 
-public class ChildWindowFocusTest extends Applet {
+public class ChildWindowFocusTest {
     Robot robot;
     Frame frame = new Frame("Owner");
     Button button0 = new Button("button-0");
@@ -46,16 +44,18 @@
     Button button1 = new Button("button-1");
     int shift;
 
+    public static void main(final String[] args) {
+        ChildWindowFocusTest app = new ChildWindowFocusTest();
+        app.init();
+        app.start();
+    }
+
     public void init() {
         try {
             robot = new Robot();
         } catch (AWTException e) {
             throw new RuntimeException("Error: unable to create robot", e);
         }
-        // Create instructions for the user here, as well as set up
-        // the environment -- set the layout manager, add buttons,
-        // etc.
-        this.setLayout (new BorderLayout ());
         shift = 100;
     }