3069N/A/*
3069N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
3069N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3069N/A *
3069N/A * This code is free software; you can redistribute it and/or modify it
3069N/A * under the terms of the GNU General Public License version 2 only, as
3069N/A * published by the Free Software Foundation.
3069N/A *
3069N/A * This code is distributed in the hope that it will be useful, but WITHOUT
3069N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3069N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3069N/A * version 2 for more details (a copy is included in the LICENSE file that
3069N/A * accompanied this code).
3069N/A *
3069N/A * You should have received a copy of the GNU General Public License version
3069N/A * 2 along with this work; if not, write to the Free Software Foundation,
3069N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3069N/A *
3069N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3069N/A * or visit www.oracle.com if you need additional information or have any
3069N/A * questions.
3069N/A */
3069N/A
3069N/A/*
3069N/A @test
3069N/A @bug 6990904
3069N/A @summary on oel5.5, Frame doesn't show if the Frame has only a MenuBar as its component.
3069N/A @author Andrei Dmitriev: area=awt-menubar
3069N/A @run main/timeout=30 DeadlockTest1
3069N/A*/
3069N/A
3069N/Aimport java.awt.*;
3069N/A
3069N/Apublic class DeadlockTest1 {
3069N/A Frame f = new Frame("Menu Frame");
3069N/A
3069N/A DeadlockTest1() {
3069N/A MenuBar menubar = new MenuBar();
3069N/A
3069N/A Menu file = new Menu("File");
3069N/A Menu edit = new Menu("Edit");
3069N/A Menu help = new Menu("Help");
3069N/A
3069N/A MenuItem open = new MenuItem("Open");
3069N/A MenuItem close = new MenuItem("Close");
3069N/A MenuItem copy = new MenuItem("Copy");
3069N/A MenuItem paste = new MenuItem("Paste");
3069N/A
3069N/A file.add(open);
3069N/A file.add(close);
3069N/A
3069N/A edit.add(copy);
3069N/A edit.add(paste);
3069N/A menubar.add(file);
3069N/A menubar.add(edit);
3069N/A menubar.add(help);
3069N/A menubar.setHelpMenu(help);
3069N/A
3069N/A f.setMenuBar(menubar);
3069N/A f.setSize(400,200);
3069N/A f.setVisible(true);
3069N/A try {
3069N/A Thread.sleep(5000);
3069N/A } catch (InterruptedException z) {
3069N/A throw new RuntimeException(z);
3069N/A }
3069N/A f.dispose();
3069N/A }
3069N/A
3069N/A public static void main(String argv[]) {
3069N/A new DeadlockTest1();
3069N/A }
3069N/A}