< prev index next >

test/jdk/java/awt/event/MouseEvent/RobotLWTest/RobotLWTest.java

Print this page

        

@@ -20,42 +20,38 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
 /*
-  test
+  @test
+  @key headful
   @bug 4350402
   @summary Tests that mouse behavior on LW component
+  @compile ../../../regtesthelpers/Util.java
+  @run main RobotLWTest
 */
 
-/**
- * RobotLWTest.java
- *
- * summary:
- */
-
-import java.applet.Applet;
 import java.awt.*;
 import java.awt.event.*;
 import test.java.awt.regtesthelpers.Util;
 
-public class RobotLWTest extends Applet
-{
-    //Declare things used in the test, like buttons and labels here
+public class RobotLWTest {
 
-    public void init()
-    {
-    }//End  init()
+    public static void main(String[] args) {
+        RobotLWTest app = new RobotLWTest();
+        app.start();
+    }
 
     public void start ()
     {
         Frame frame = new Frame();
         MyLWContainer c = new MyLWContainer();
         MyLWComponent b = new MyLWComponent();
         c.add(b);
         frame.add(c);
         frame.setSize(400,400);
+        frame.setLocationRelativeTo(null);
         frame.setVisible(true);
 
         try {
             Robot robot = new Robot();
             robot.setAutoWaitForIdle(true);
< prev index next >