JDK-4949032 : setBackgound does not work correctly in 1.5
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2003-11-05
  • Updated: 2003-12-04
  • Resolved: 2003-12-04
Related Reports
Duplicate :  
Description
The program which once worked well in 1.3.1_0X/1.4.X does not in
1.5(build26).

The attached test program shows the applet which has 3 buttons on  a toolBar.
Each button's action tries to change the color of toolBar and the button
itself.
Clicking the button does not change the colors in 1.5.

REPRODUCE:
  1) Compile the attached test program and invoke the attached html file.
  2) Click one of the buttons.

EXPECTED BEHAVIOR:
  The color of the button and toolBar change with out clicking thebutton.

ACTUAL BEHAVIOR:
  Any action coes not occur for Button and toolsBar.

CONFIGRATION:
  Pentium IV 1.4[GHz]
  386 [MB]
  Windows XP(SP1, Japanese)
  Internet explorer 6 (SP1)
  JRE1.5.0-beta-b26

========================================================================

Comments
EVALUATION Ocean makes toolbar buttons transparent so that so you can see the gradient. This means you won't see any background that is set. Two options: . Force developers to invoke setOpaque(true) if that is what what they want. . Special case JButtons so that they'll do a fillRect if in ocean and they are transparent and in a JToolBar and have a non-UIResource background. ###@###.### 2003-11-05 This has been addressed by 4908404, refer to it for details. ###@###.### 2003-12-04
05-11-2003