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.
Created attachment 141929 [details] Screenshot of an OutlineView exhibiting the bug See the attached image. I have an OutlineView which displays a tree of Nodes with a couple of property columns added using OutlineView.addPropertyColumn(). When any row is selected in the OutlineView, all the property value renderers are painted with a weird black background. In the example, I am using a standard boolean cell renderer, a custom dropdown renderer, and a standard string renderer. If you look closely, there is not only a black background, but also a change in color of the text in the string-based cell renderers (the text is supposed to be black on gray, but is light blue on black instead). On my current Java version (see below), the bug happens entirely consistently. The bug does not appear on Windows, nor on the Nimbus L&F on MacOS, so it seems specific to the Aqua L&F. I have not seen this exact bug in earlier Java versions (I ran an earlier patch release of 1.7 until some weeks ago), although every now and then, after deleting a node, the same visual bug would happen on a single row even in earlier versions. The platform app exhibiting this behavior was using the NetBeans RELEASE74 version of the OutlineView, but switching down to RELEASE72 did not make a difference. I tried explicitly doing a repaint() on the OutlineView after selection, but this did not make any difference. Note that as soon as the OutlineView loses focus, the black backgrounds go away, and as soon as the OutlineView gains focus again, the black backgrounds reappear. Product Version: NetBeans IDE 7.4 (Build 201310111528) Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Mac OS X version 10.9 running on x86_64; UTF-8; en_US (nb) User directory: /Users/ebakke/Library/Application Support/NetBeans/7.4 Cache directory: /Users/ebakke/Library/Caches/NetBeans/7.4
Created attachment 142015 [details] Minimal example platform application exhibiting OutlineView rendering bug on MacOS Adding a sample NetBeans Platform application that opens a TopComponent with an OutlineView exhibiting the bug described in this report.
Created attachment 142017 [details] Screenshot of attached minimal application exhibiting the bug
I just downgraded to Java 1.7.0_25, and the bug is still present there.
OK, some further investigation reveals that this bug was actually introduced in the transition from RELEASE731 to RELEASE74. Changing RELEASE74 to RELEASE731 in the attached minimal example application does indeed remove the bug. (My earlier comment about the bug being present in RELEASE72 turned out to be wrong, so please disregard it. Sorry about my confusion.) So this looks like a recently introduced NetBeans bug, not a JDK-related one.
I just upgraded to JDK 8 and can confirm that the bug is still present there. It seems to be a NetBeans Platform problem. (Java Version: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b59.)
> So this looks like a recently introduced NetBeans bug, not a JDK-related one. Thank you very much for the info and for the sample application. The bug was introduced in changeset core-main #d13de90cb854 (bug 233210).
Default cell renderer has black background: defaultRendererComponent.getBackground() = (com.apple.laf.AquaImageFactory$SystemColorProxy) com.apple.laf.AquaImageFactory$SystemColorProxy[r=0,g=0,b=0]
Created attachment 144475 [details] Proposed Patch
Thanks for fixing this! My OutlineView-based navigator window will once more look beautiful... :-)
Patch applied as http://hg.netbeans.org/core-main/rev/7905b13625af. Thank you, Martin, for reviewing.
Integrated into 'main-silver', will be available in build *201402070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/7905b13625af User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #238079: OutlineView cell renderers drawn improperly when row selected (Aqua L&F)
I just upgraded my platform application from RELEASE80 to RELEASE801, and this exact bug, which was previously fixed in 8.0, reappeared. The minimal example platform application that I attached earlier still triggers the bug when netbeans.version is changed from RELEASE74 to RELEASE801 in pom.xml. Did the patch get lost somewhere?
Created attachment 149310 [details] Minimal example application, with POM versions bumped to compile on RELEASE801 (no other changes) I've bumped the version of the minimal example exhibiting the bug so that it will build with RELEASE801. I've made no other changes. This example application shows the reappearance of the bug in RELEASE801. If netbeans.version is set back to RELEASE80 in the top-level pom.xml, the bug will disappear (it was first observed in RELEASE74, then fixed in RELEASE80, then reappeared in RELEASE801).
> Did the patch get lost somewhere? Version 8.0.1 still contains the patch. Martin, can you please check the reopened bug? Any ideas why the problem could reappeared?
I have noticed that in RELEASE801 there are two new lines in DefaultOutlineCellRenderer.getTableCellRendererComponent setForeground(null); setBackground(null); Could this prevent previous patch from working?