Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4949032
Votes 0
Synopsis setBackgound does not work correctly in 1.5
Category java:classes_swing
Reported Against 1.5
Release Fixed
State 11-Closed, duplicate of 4908404, bug
Priority: 3-Medium
Related Bugs 4908404
Submit Date 05-NOV-2003
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

========================================================================
Work Around
N/A
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.
  xxxxx@xxxxx   2003-11-05

This has been addressed by 4908404, refer to it for details.
  xxxxx@xxxxx   2003-12-04
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang