1 /*
2 * Copyright (c) 2012, 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 * Portions Copyright (c) 2012 IBM Corporation
26 */
27
28 /*
29 @test
30 @bug 7170655
31 @summary Frame size does not change after changing font
32 @author Jonathan Lu
33 @library ../../regtesthelpers
34 @build Util
35 @run main ResizeAfterSetFont
36 */
37
38 import java.awt.*;
39 import test.java.awt.regtesthelpers.Util;
40
41 public class ResizeAfterSetFont {
42
43 public static void main(String[] args) throws Exception {
44 Frame frame = new Frame("bug7170655");
45 frame.setLayout(new BorderLayout());
46 frame.setBackground(Color.LIGHT_GRAY);
47
48 Panel panel = new Panel();
49 panel.setLayout(new GridLayout(0, 1, 1, 1));
|
1 /*
2 * Copyright (c) 2012, 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 * Portions Copyright (c) 2012 IBM Corporation
26 */
27
28 /*
29 @test
30 @key headful
31 @bug 7170655
32 @summary Frame size does not change after changing font
33 @author Jonathan Lu
34 @library ../../regtesthelpers
35 @build Util
36 @run main ResizeAfterSetFont
37 */
38
39 import java.awt.*;
40 import test.java.awt.regtesthelpers.Util;
41
42 public class ResizeAfterSetFont {
43
44 public static void main(String[] args) throws Exception {
45 Frame frame = new Frame("bug7170655");
46 frame.setLayout(new BorderLayout());
47 frame.setBackground(Color.LIGHT_GRAY);
48
49 Panel panel = new Panel();
50 panel.setLayout(new GridLayout(0, 1, 1, 1));
|