1 /*
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.*;
25 import java.awt.event.*;
26
27 /**
28 * Test that it is possible to type "Alt code" on Windows.
29 * Windows-only test.
30 */
31 /*
32 @test
33 @summary Test that it is possible to type "Alt code" on Windows.
34 @library ../../../../lib/testlibrary
35 @build ExtendedRobot
36 @run main AltPlusNumberKeyCombinationsTest
37 */
38 public class AltPlusNumberKeyCombinationsTest {
39
40 private Frame frame;
41 private TextField tf;
42 private TextArea ta;
43
44 private static int delay = 500;
45 private static String euroChar = "\u20AC";
46 private static String accChar = "\u00E3";
47
48 private boolean passed = true;
49 private ExtendedRobot robot;
50
51 public AltPlusNumberKeyCombinationsTest() {
52 try {
53 Toolkit.getDefaultToolkit().getSystemEventQueue().invokeAndWait(new Runnable() {
54 public void run() {
55 initializeGUI();
56 }
57 });
|
1 /*
2 * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.*;
25 import java.awt.event.*;
26
27 /**
28 * @test
29 * @key headful
30 * @summary Test that it is possible to type "Alt code" on Windows.
31 * @requires (os.family == "windows")
32 * @library ../../../../lib/testlibrary
33 * @build ExtendedRobot
34 * @run main AltPlusNumberKeyCombinationsTest
35 */
36
37 public class AltPlusNumberKeyCombinationsTest {
38
39 private Frame frame;
40 private TextField tf;
41 private TextArea ta;
42
43 private static int delay = 500;
44 private static String euroChar = "\u20AC";
45 private static String accChar = "\u00E3";
46
47 private boolean passed = true;
48 private ExtendedRobot robot;
49
50 public AltPlusNumberKeyCombinationsTest() {
51 try {
52 Toolkit.getDefaultToolkit().getSystemEventQueue().invokeAndWait(new Runnable() {
53 public void run() {
54 initializeGUI();
55 }
56 });
|