< prev index next >
test/jdk/java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.java
Print this page
@@ -20,23 +20,23 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
- test
+ @test
+ @key headful
@bug 6253913
@summary Tests that a Window shown before its owner is focusable.
- @author anton.tarasov@sun.com: area=awt-focus
- @run applet WindowUpdateFocusabilityTest.html
+ @modules java.desktop/sun.awt
+ @run main WindowUpdateFocusabilityTest
*/
import java.awt.*;
import java.awt.event.*;
-import java.applet.Applet;
import java.lang.reflect.*;
-public class WindowUpdateFocusabilityTest extends Applet {
+public class WindowUpdateFocusabilityTest {
Robot robot;
boolean focusGained = false;
final Object monitor = new Object();
FocusListener listener = new FocusAdapter () {
public void focusGained(FocusEvent e) {
@@ -58,14 +58,10 @@
try {
robot = new Robot();
} catch (AWTException e) {
throw new RuntimeException("Error: couldn't create robot");
}
- // Create instructions for the user here, as well as set up
- // the environment -- set the layout manager, add buttons,
- // etc.
- this.setLayout (new BorderLayout ());
}
public void start() {
if ("sun.awt.motif.MToolkit".equals(Toolkit.getDefaultToolkit().getClass().getName())) {
System.out.println("No testing on Motif.");
< prev index next >