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 import java.awt.*;
26 import java.awt.event.*;
27 import java.lang.reflect.InvocationTargetException;
28 import javax.swing.SwingUtilities;
29 import java.io.*;
30
31 /**
32 * AWT Mixing test for HierarchyBoundsListener ancestors.
33 * <p>See <a href="https://bugs.openjdk.java.net/browse/JDK-6768230">CR6768230</a> for details.
34 */
35 /*
36 @test
37 @bug 6768230
38 @summary Mixing test for HierarchyBoundsListener ancestors
39 @build FrameBorderCounter
40 @run main HierarchyBoundsListenerMixingTest
41 */
42 public class HierarchyBoundsListenerMixingTest {
43
44 protected void prepareControls() {
45 dummy = new Frame();
46 dummy.setSize(100, 100);
47 dummy.setLocation(0, 350);
48 dummy.setVisible(true);
49
50 frame = new Frame("Test Frame");
51 frame.setLayout(new FlowLayout());
52
53 panel = new Panel();
54 button = new Button("Button");
55 label = new Label("Label");
56 list = new List();
57 list.add("One");
58 list.add("Two");
59 list.add("Three");
60 choice = new Choice();
|
1 /*
2 * Copyright (c) 2014, 2016, 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 import java.awt.*;
26 import java.awt.event.*;
27 import java.lang.reflect.InvocationTargetException;
28 import javax.swing.SwingUtilities;
29 import java.io.*;
30
31 /**
32 * AWT Mixing test for HierarchyBoundsListener ancestors.
33 * <p>See <a href="https://bugs.openjdk.java.net/browse/JDK-6768230">CR6768230</a> for details.
34 */
35 /*
36 * @test
37 * @key headful
38 * @bug 6768230
39 * @summary Mixing test for HierarchyBoundsListener ancestors
40 * @build FrameBorderCounter
41 * @run main HierarchyBoundsListenerMixingTest
42 */
43 public class HierarchyBoundsListenerMixingTest {
44
45 protected void prepareControls() {
46 dummy = new Frame();
47 dummy.setSize(100, 100);
48 dummy.setLocation(0, 350);
49 dummy.setVisible(true);
50
51 frame = new Frame("Test Frame");
52 frame.setLayout(new FlowLayout());
53
54 panel = new Panel();
55 button = new Button("Button");
56 label = new Label("Label");
57 list = new List();
58 list.add("One");
59 list.add("Two");
60 list.add("Three");
61 choice = new Choice();
|