< prev index next >

test/jdk/java/awt/Focus/RestoreFocusOnDisabledComponentTest/RestoreFocusOnDisabledComponentTest.java

Print this page

        

@@ -20,29 +20,27 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
 /*
-  @test      %W% %E%
+  @test
   @key headful
   @bug       6598089
   @summary   Tests restoring focus on a single disabled coponent
-  @author    Anton Tarasov: area=awt-focus
   @library   ../../regtesthelpers
   @build     Util
   @run       main RestoreFocusOnDisabledComponentTest
 */
 
 import java.awt.*;
 import java.awt.event.*;
-import java.applet.Applet;
 import test.java.awt.regtesthelpers.Util;
 
 /*
  * The bug is not reproducible on Windows.
  */
-public class RestoreFocusOnDisabledComponentTest extends Applet {
+public class RestoreFocusOnDisabledComponentTest {
     Frame frame = new Frame("Frame") {public String toString() {return "FRAME";}};
     Button b0 = new Button("button0") {public String toString() {return "B-0";}};
     Button b1 = new Button("button1") {public String toString() {return "B-1";}};
     volatile int nFocused;
     Robot robot;

@@ -60,11 +58,11 @@
     public void start() {
         frame.add(b0);
         frame.add(b1);
         frame.setLayout(new FlowLayout());
         frame.pack();
-
+        frame.setLocationRelativeTo(null);
         frame.setVisible(true);
 
         Util.waitForIdle(robot);
         KeyboardFocusManager.setCurrentKeyboardFocusManager(new DefaultKeyboardFocusManager() {
             public boolean dispatchEvent(AWTEvent e) {
< prev index next >