< prev index next >

test/jdk/java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.java

Print this page

        

*** 20,42 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! test @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 */ import java.awt.*; import java.awt.event.*; - import java.applet.Applet; import java.lang.reflect.*; ! public class WindowUpdateFocusabilityTest extends Applet { Robot robot; boolean focusGained = false; final Object monitor = new Object(); FocusListener listener = new FocusAdapter () { public void focusGained(FocusEvent e) { --- 20,42 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! @test ! @key headful @bug 6253913 @summary Tests that a Window shown before its owner is focusable. ! @modules java.desktop/sun.awt ! @run main WindowUpdateFocusabilityTest */ import java.awt.*; import java.awt.event.*; import java.lang.reflect.*; ! public class WindowUpdateFocusabilityTest { Robot robot; boolean focusGained = false; final Object monitor = new Object(); FocusListener listener = new FocusAdapter () { public void focusGained(FocusEvent e) {
*** 58,71 **** 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."); --- 58,67 ----
< prev index next >