equal
deleted
inserted
replaced
24 /* |
24 /* |
25 @test |
25 @test |
26 @key headful |
26 @key headful |
27 @bug 6187066 |
27 @bug 6187066 |
28 @summary Tests the Window.autoRequestFocus property for the Window.setVisible() method. |
28 @summary Tests the Window.autoRequestFocus property for the Window.setVisible() method. |
29 @author anton.tarasov: area=awt.focus |
|
30 @library ../../regtesthelpers |
29 @library ../../regtesthelpers |
31 @build Util |
30 @build Util |
32 @run main AutoRequestFocusSetVisibleTest |
31 @run main AutoRequestFocusSetVisibleTest |
33 */ |
32 */ |
34 |
33 |
35 import java.awt.*; |
34 import java.awt.*; |
36 import java.awt.event.*; |
|
37 import java.applet.Applet; |
|
38 import java.util.concurrent.atomic.AtomicBoolean; |
|
39 import java.lang.reflect.InvocationTargetException; |
|
40 import test.java.awt.regtesthelpers.Util; |
35 import test.java.awt.regtesthelpers.Util; |
41 |
36 |
42 public class AutoRequestFocusSetVisibleTest extends Applet { |
37 public class AutoRequestFocusSetVisibleTest { |
43 static Frame focusedFrame; |
38 static Frame focusedFrame; |
44 static Button focusOwner; |
39 static Button focusOwner; |
45 static Frame frame; |
40 static Frame frame; |
46 static Button frameButton; |
41 static Button frameButton; |
47 static Frame frame2; |
42 static Frame frame2; |
63 app.init(); |
58 app.init(); |
64 app.start(); |
59 app.start(); |
65 } |
60 } |
66 |
61 |
67 public void init() { |
62 public void init() { |
68 // Create instructions for the user here, as well as set up |
|
69 // the environment -- set the layout manager, add buttons, |
|
70 // etc. |
|
71 this.setLayout (new BorderLayout ()); |
|
72 toolkitClassName = Toolkit.getDefaultToolkit().getClass().getName(); |
63 toolkitClassName = Toolkit.getDefaultToolkit().getClass().getName(); |
73 } |
64 } |
74 |
65 |
75 void recreateGUI() { |
66 void recreateGUI() { |
76 if (focusedFrame != null) { |
67 if (focusedFrame != null) { |