This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 230371 - Selecting color from Swing palette will hardcode the color in RGB
Summary: Selecting color from Swing palette will hardcode the color in RGB
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.4
Hardware: PC Linux
: P2 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-28 09:51 UTC by Ondrej Vrabec
Modified: 2013-06-18 16:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Vrabec 2013-05-28 09:51:27 UTC
Product Version = NetBeans IDE Dev (Build 20130523-d103dd8c8e09)
Operating System = Linux version 3.1.10-1.19-desktop running on amd64
Java; VM; Vendor = 1.7.0_21
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.21-b01

1) Open a form file in the Design mode
2) Select a component
3) Edit its foreground color and select Label.disabledForeground from the Swing palette tab and click on OK
4) The generated code is "jLabel2.setForeground(new java.awt.Color(153, 153, 153))" instead of expected "jLabel2.setBackground(UIManager.getDefault().getColor("Label.disabledForeground"))"
Comment 1 Tomas Pavek 2013-06-04 09:52:28 UTC
Looks like this was caused by a change in JDK 1.7: ColorChooserPanel.propertyChange causes that the SuperColor object set to the selection model is copied and set again which removes the additional information stored in SuperColor.

Workaround applied:
http://hg.netbeans.org/jet-main/rev/472e0ca83d59
Comment 2 Quality Engineering 2013-06-05 09:33:49 UTC
Integrated into 'main-golden', will be available in build *201306050626* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/472e0ca83d59
User: Tomas Pavek <tpavek@netbeans.org>
Log: #230371: workarounding re-entrant call from ColorChooserPanel.propertyChange (JDK 1.7 change) causing loss of the set SuperColor value
Comment 3 Tomas Pavek 2013-06-18 16:48:16 UTC
Transplanted to jdev_aspen as c864b0391999.