< prev index next >

test/jdk/java/awt/Focus/ConsumeNextKeyTypedOnModalShowTest/ConsumeNextKeyTypedOnModalShowTest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 20,47 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! @test %W% %E% @key headful @bug 6637607 @summary Showing a modal dlg on TAB KEY_PRESS shouldn't consume inappropriate KEY_TYPED. - @author Anton Tarasov: area=awt-focus @library ../../regtesthelpers @build Util @run main ConsumeNextKeyTypedOnModalShowTest */ import java.awt.*; import java.awt.event.*; - import java.applet.Applet; - import java.util.concurrent.atomic.AtomicBoolean; - import java.lang.reflect.InvocationTargetException; import test.java.awt.regtesthelpers.Util; ! public class ConsumeNextKeyTypedOnModalShowTest extends Applet { Robot robot; Frame frame = new Frame("Frame"); Dialog dialog = new Dialog(frame, "Dialog", true); TextField tf0 = new TextField(); TextField tf1 = new TextField(); --- 20,43 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! @test @key headful @bug 6637607 @summary Showing a modal dlg on TAB KEY_PRESS shouldn't consume inappropriate KEY_TYPED. @library ../../regtesthelpers @build Util @run main ConsumeNextKeyTypedOnModalShowTest */ import java.awt.*; import java.awt.event.*; import test.java.awt.regtesthelpers.Util; ! public class ConsumeNextKeyTypedOnModalShowTest { Robot robot; Frame frame = new Frame("Frame"); Dialog dialog = new Dialog(frame, "Dialog", true); TextField tf0 = new TextField(); TextField tf1 = new TextField();
*** 74,83 **** --- 70,80 ---- } }, KeyEvent.KEY_EVENT_MASK); } public void start() { + frame.setLocationRelativeTo(null); frame.setVisible(true); Util.waitTillShown(frame); // Show the dialog. robot.keyPress(KeyEvent.VK_TAB);
< prev index next >