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 /* @test
25 @bug 8139227
26 @summary Text fields in JPopupMenu structure do not receive focus in hosted
27 Applets
28 @author Semyon Sadetsky
29 @run applet FindOwnerTest.html
30 */
31
32 import java.applet.Applet;
33 import java.awt.*;
34 import java.awt.event.*;
35 import javax.swing.*;
36
37 public class FindOwnerTest extends Applet
38 {
39
40 private boolean gained;
41
42 public void init() {
43 super.init();
44 }
45
46 @Override
47 public void start() {
48 Window owner = SwingUtilities.windowForComponent(this);
49
|
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 /* @bug 8139227
25 @summary Text fields in JPopupMenu structure do not receive focus in hosted
26 Applets
27 @author Semyon Sadetsky
28 */
29
30 import java.applet.Applet;
31 import java.awt.*;
32 import java.awt.event.*;
33 import javax.swing.*;
34
35 public class FindOwnerTest extends Applet
36 {
37
38 private boolean gained;
39
40 public void init() {
41 super.init();
42 }
43
44 @Override
45 public void start() {
46 Window owner = SwingUtilities.windowForComponent(this);
47
|