jdk/test/javax/swing/JColorChooser/Test6977726.java
author goetz
Tue, 09 Dec 2014 11:57:46 +0100
changeset 28187 fc19df82d6ee
parent 6512 ce0a2790e09f
permissions -rw-r--r--
8066964: ppc64: argument and return type profiling, fix problem with popframe Reviewed-by: roland, kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6512
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
     1
/*
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
     2
 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
     4
 *
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
     7
 * published by the Free Software Foundation.
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
     8
 *
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    13
 * accompanied this code).
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    14
 *
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    18
 *
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    21
 * questions.
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    22
 */
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    23
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    24
/*
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    25
 * @test
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    26
 * @bug 6977726
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    27
 * @summary Checks if JColorChooser.setPreviewPanel removes the old one
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    28
 * @author Sergey Malenkov
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    29
 * @run applet/manual=yesno Test6977726.html
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    30
 */
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    31
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    32
import javax.swing.JApplet;
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    33
import javax.swing.JColorChooser;
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    34
import javax.swing.JLabel;
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    35
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    36
public class Test6977726 extends JApplet {
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    37
    public void init() {
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    38
        JColorChooser chooser = new JColorChooser();
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    39
        chooser.setPreviewPanel(new JLabel("Text Preview Panel"));
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    40
        getContentPane().add(chooser);
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    41
    }
ce0a2790e09f 6977726: JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
malenkov
parents:
diff changeset
    42
}