< prev index next >

test/jdk/java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowRetaining.java

Print this page

        

@@ -24,23 +24,20 @@
 /*
   @test
   @key headful
   @bug      4823903
   @summary  Tests actual focused window retaining.
-  @author   Anton.Tarasov: area=awt.focus
   @library  ../../regtesthelpers
   @build    Util
   @run      main ActualFocusedWindowRetaining
 */
 
 import java.awt.*;
 import java.awt.event.*;
-import java.lang.reflect.*;
-import java.applet.*;
 import test.java.awt.regtesthelpers.Util;
 
-public class ActualFocusedWindowRetaining extends Applet {
+public class ActualFocusedWindowRetaining {
     public static Frame frame = new Frame("Other Frame");
     public static Frame owner = new Frame("Test Frame");
     public static Button otherButton1 = new Button("Other Button 1");
     public static Button otherButton2 = new Button("Other Button 2");
     public static Button otherButton3 = new Button("Other Button 3");

@@ -52,11 +49,10 @@
     public static int step;
     public static Robot robot = Util.createRobot();
 
     public static void main(String[] args) {
         ActualFocusedWindowRetaining a = new ActualFocusedWindowRetaining();
-        a.init();
         a.start();
     }
 
     public void start () {
         Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {

@@ -74,14 +70,10 @@
                         System.out.println(e.paramString() + " on <Non-testing component>");
                     }
                 }
             }, AWTEvent.WINDOW_EVENT_MASK | AWTEvent.WINDOW_FOCUS_EVENT_MASK | AWTEvent.FOCUS_EVENT_MASK);
 
-        setSize (500, 200);
-        setVisible(true);
-        validate();
-
         frame.setSize(new Dimension(400, 100));
         frame.setLocation(800, 400);
         frame.setVisible(true);
         frame.toFront();
 
< prev index next >