190N/A/*
2362N/A * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
190N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
190N/A *
190N/A * This code is free software; you can redistribute it and/or modify it
190N/A * under the terms of the GNU General Public License version 2 only, as
190N/A * published by the Free Software Foundation.
190N/A *
190N/A * This code is distributed in the hope that it will be useful, but WITHOUT
190N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
190N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
190N/A * version 2 for more details (a copy is included in the LICENSE file that
190N/A * accompanied this code).
190N/A *
190N/A * You should have received a copy of the GNU General Public License version
190N/A * 2 along with this work; if not, write to the Free Software Foundation,
190N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
190N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
190N/A */
190N/A
190N/A/*
190N/A * @test
190N/A * @bug 6675802
190N/A * @summary Checks that there is no AccessControlException when
190N/A * a heaviweight popup menu is shown from an applet.
190N/A * @author Mikhail Lapshin
190N/A * @run main bug6675802
190N/A */
190N/A
190N/Aimport javax.swing.*;
190N/A
190N/Apublic class bug6675802 {
190N/A public static void main(String[] args) {
190N/A System.setSecurityManager(new SecurityManager());
190N/A final JPopupMenu popupMenu = new JPopupMenu();
190N/A popupMenu.add(new JMenuItem("Click"));
190N/A popupMenu.show(null, 0, 0);
190N/A System.out.println("Test passed");
190N/A }
190N/A}