JDK-6977726 : JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris
  • CPU: generic,x86
  • Submitted: 2010-08-17
  • Updated: 2012-03-22
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b112Fixed
Related Reports
Duplicate :  
Relates :  
Description
JColorChooser.getPreviewPanel() returnes null starting from jdk7 b105.

2 JCK7 tests are affected:
api/javax_swing/plaf/basic/BasicColorChooserUI/index.html#protected[BasicColorChooserUI2005]
api/javax_swing/plaf/basic/BasicColorChooserUI/index.html#public[BasicColorChooserUI0001]

Following code demonstates the problem:

import java.awt.*;
import javax.swing.*;

public class test  {
    public static void main(String argv[]) {
        JColorChooser colorChooser = new JColorChooser();
        colorChooser.getPreviewPanel().getForeground();
    }
}

Comments
EVALUATION reproduced, this looks like a regression or #6199676
30-08-2010