JDK-8000435 : [macosx] Button painting error under Java 7 on Mac
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2012-10-04
  • Updated: 2013-12-06
  • Resolved: 2013-03-18
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 JDK 8
7u40Fixed 8 b84Fixed
Description
JButtons are painted when embedded in JToolBars on Java 7 in combination with using the "segmentedTextured" client property button type seems not work well on Mac

Check screenshots for running demo app under Java 6 and Java 7 on Mac (OS X Mountain Lion):

Java 6:

The rightmost buttons have been polished to look more "Macish" with the help of the following code:
putClientProperty("JButton.buttonType", "segmentedTextured");


Java 7:

Executing the same code on Java 7 shows that the "segmentedTextured" client property of the buttons in the rightmost toolbar breaks the painting. At least it doesn't look good to have the buttons only painted to the left and right. When adding a 20x20 px icon to a button, it actually paints ok, so pretty certain that this is a painting bug.

Attached an executable jar file for this demo app and the source code.
Comments
Verified!
15-05-2013

CAP member had verified this issue had been resolved in the JDK8 b84 and hope got it back port to 7u release asap, so they could migrate to 7u release.
08-04-2013

Yes. it will be updated automatically.
28-03-2013

Has this fix been integrated to the master? It shows as fixed in build 'team'. That will be updated automatically when the integration takes place? -Roger
28-03-2013

PS. jAlbum is i pretty frequent use these days. There are about 7000 new jAlbum albums being uploaded to the internet every day. However, this issue, sadly they still do development on JDK6 for this reason.
28-03-2013

Suggested fix: http://cr.openjdk.java.net/~serb/8000435/
12-03-2013

his painting bug sadly still persists on build 1.7.0_15-b03 for Mac OSX. This issue keeps CAP member from releasing jAlbum in AppStore bundled with Java 7 and should be addressed asap.
05-03-2013

it is a showstopper issue that keep the CAP member from releasing their apps on Mac
05-12-2012

Mac evaluation is needed.
09-10-2012