< prev index next >

test/jdk/java/awt/Focus/NonFocusableBlockedOwnerTest/NonFocusableBlockedOwnerTest.java

Print this page

        

*** 20,42 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! test @bug 6272324 @summary Modal excluded Window which decorated parent is blocked should be non-focusable. ! @author anton.tarasov@sun.com: area=awt.focus ! @run applet NonFocusableBlockedOwnerTest.html */ - import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.lang.reflect.*; ! public class NonFocusableBlockedOwnerTest extends Applet { Robot robot; Frame frame = new Frame("Modal Blocked Frame"); Dialog dialog = new Dialog(frame, "Modal Dialog", true); Window excluded = new Window(frame); Button button = new Button("button"); --- 20,42 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! @test ! @key headful @bug 6272324 @summary Modal excluded Window which decorated parent is blocked should be non-focusable. ! @modules java.desktop/sun.awt ! @run main NonFocusableBlockedOwnerTest */ import java.awt.*; import java.awt.event.*; import java.lang.reflect.*; ! public class NonFocusableBlockedOwnerTest { Robot robot; Frame frame = new Frame("Modal Blocked Frame"); Dialog dialog = new Dialog(frame, "Modal Dialog", true); Window excluded = new Window(frame); Button button = new Button("button");
*** 51,64 **** 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() { if ("sun.awt.motif.MToolkit".equals(Toolkit.getDefaultToolkit().getClass().getName())) { --- 51,60 ----
< prev index next >