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 /* 25 * @test 26 * @bug 8044614 27 * @summary Tests focus transfer between applets in different browser windows 28 * @author Dmitry Markov 29 * @library ../../regtesthelpers 30 * @build Sysout 31 * @run applet/manual=yesno bug8044614.html 32 */ 33 34 import javax.swing.JApplet; 35 36 import test.java.awt.regtesthelpers.Sysout; 37 38 public class bug8044614 extends JApplet { 39 public void init() { 40 String[] instructions = { 41 "(1) Go to the test directory test/java/awt/Focus/8044614", 42 "(2) Compile source file: javac TestApplet.java", 43 "(3) Open the \"main.html\" file in the browser", 44 "(4) Click the \"Start First Applet\" link to open the first applet window", 45 "(5) Wait for the applet to start (press \"Run\" to any security alerts that appears)", 46 "(6) Enter \"Hello\" to the text field", 47 "(7) Click the \"Start Second Applet)\" link to open the second applet window", 48 "(8) Wait for the applet to start (press \"Run\" to any security alerts that appears)", 49 "(9) Enter \"World\" to the text field", 50 "(10) Go back to the first applet and make sure you can enter some text to the text field" 51 }; 52 53 Sysout.createDialogWithInstructions(instructions); 54 } 55 } 56