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 120997 - Rendering bug in tab control on mac/jdk 6 w/ leopard
Summary: Rendering bug in tab control on mac/jdk 6 w/ leopard
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: David Simonek
Depends on:
Reported: 2007-11-02 16:54 UTC by _ tboudreau
Modified: 2008-12-22 10:50 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Screen shot (5.59 KB, image/jpeg)
2007-11-02 16:54 UTC, _ tboudreau

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2007-11-02 16:54:13 UTC
Reported to me by an apple JDK engineer - simple to fix and would be nice to fix for 6.0, since the code change should be trivial:
Hi Tim, we have gotten reports of a visual glitch in NetBeans on Leopard.

NetBeans appears to be relying on an assumption that GraphicsConfiguration.createCompatableImage() always returned an image type that supported alpha in 
Quartz. When running in the Sun 2D pipeline (which is now the default in Leopard) this is no longer true.

I think this explains what I'm seeing in this screen shot.

(I will attach the screen shot)
Comment 1 _ tboudreau 2007-11-02 16:54:51 UTC
Created attachment 52391 [details]
Screen shot
Comment 2 David Simonek 2007-11-02 17:45:45 UTC
What am I supposed to do? Shouldn't we use createCompatibleImage? Or what? Sorry but report is incomplete.
Moreover I don't have a chance to test the fix, so this is not trivial at all to me.
Comment 3 _ tboudreau 2007-11-05 05:54:08 UTC
Fix would just be to use 
new BufferedImage (width, height, BufferedImage.TYPE_INT_ARGB)
to create the image.

It used to be true that you got much better performance with TYPE_INT_ARGB_PRE on Mac OS, so I know that Utilities.loadImage() uses that.  I'll check with my 
contact to see if that is still true as well.

At any rate, it's a trivial one-line change, and if we don't do it things will look a bit ugly on JDK 6 on Mac, so it would be nice to find a way to do it.
Comment 4 David Simonek 2007-11-05 13:53:26 UTC
I checked the code and found that we don't use GraphicsConfiguration.createCompatibleImage() in control buttons. Control
buttons area is regular JPanel with JButtons inside it, so this bug is probably caused by something other. Is the black
box special to document area or does it appear also on view tabs?
Comment 5 _ tboudreau 2007-11-05 19:13:58 UTC
Even on Mac OS?  I remember it used to do something weird like paint RadioButtons into an image and then use that...
Comment 6 Stanislav Aubrecht 2008-02-12 13:12:23 UTC
i tried netbeans 080122 on mac leopard 10.5.2 and jdk 1.6.0_01-dp and control buttons in editor look fine