< prev index next >

test/jdk/java/awt/Focus/ModalDialogInitialFocusTest/ModalDialogInitialFocusTest.java

Print this page

        

*** 20,43 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! test @bug 6382750 @summary Tests that modal dialog doesn't request extra initial focus on show. ! @author anton.tarasov@sun.com: area=awt.focus ! @run applet ModalDialogInitialFocusTest.html */ import java.awt.*; import java.awt.event.*; - import java.applet.Applet; - import java.util.concurrent.atomic.AtomicBoolean; - import java.lang.reflect.InvocationTargetException; ! public class ModalDialogInitialFocusTest extends Applet { Robot robot; Dialog dialog = new Dialog((Window)null, "Test Dialog", Dialog.ModalityType.TOOLKIT_MODAL); Button button = new Button("button"); --- 20,40 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! @test ! @key headful @bug 6382750 @summary Tests that modal dialog doesn't request extra initial focus on show. ! @run main ModalDialogInitialFocusTest */ import java.awt.*; import java.awt.event.*; ! public class ModalDialogInitialFocusTest { Robot robot; Dialog dialog = new Dialog((Window)null, "Test Dialog", Dialog.ModalityType.TOOLKIT_MODAL); Button button = new Button("button");
*** 53,66 **** try { robot = new Robot(); } catch (AWTException e) { throw new RuntimeException("Error: unable to create robot", e); } - // 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() { dialog.setLayout(new FlowLayout()); --- 50,59 ----
< prev index next >