JDK-4908404 : Backward compatability problems with Ocean
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS:
    generic,linux_suse_sles_8.2,solaris_9,windows_2000,windows_xp generic,linux_suse_sles_8.2,solaris_9,windows_2000,windows_xp
  • CPU: generic,x86,sparc
  • Submitted: 2003-08-18
  • Updated: 2014-09-22
  • Resolved: 2003-12-15
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.
Other
5.0 b32Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Description
It appears that JButtons with a customized background color are not rendered
properly with the Ocean L&F.

To reproduce: start up Java2Demo with any recent nightly build containing the
new Ocean L&F.  Click on the "Clipping" tab, and look at the toolbar for the
"Areas" demo (or any other panel in that tab).  The selected button (e.g.
"nop") background color should be green, as it is with the venerable Steel
L&F, but the green background does not show up with the Ocean L&F.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta FIXED IN: tiger-beta INTEGRATED IN: tiger-b32 tiger-beta
2004-06-14

EVALUATION Ocean makes any widgets added to a toolbar !opaque, which means they typically won't paint their background. Java2Demo is toggling the selected state of the JButtons as well as the background color to get a particular effect. As there may be others doing this sort of thing an easy compromise is for MetalButtonUI to render the background if it's in a toolbar and a selected state. ###@###.### 2003-08-19 As there seem to be a couple of problems cropping up with how Ocean renders some widgets I've changed the synopsis to: 'Backward compatability problems with Ocean'. The following will be changed: . Buttons will no longer draw a gradient if the background is not a UIResource. . Toolbars will no longer change the opacity of their children. This means you won't see the gradient behind toolbar buttons as you previously could, but to get this to work in a backward compatable way is problematic and not possible. . Menus/Toolbars will not draw a gradient if the background is not a UIResource. ###@###.### 2003-12-04
2003-12-04

WORK AROUND Explicitly set the opacity of the button, eg button.setOpaque(true); ###@###.### 2003-08-19
2003-08-19