JDK-4781059 : 1.4.2 Regression - JTabbedPane never regenerates disabled icon
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-11-19
  • Updated: 2003-01-04
  • Resolved: 2003-01-04
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
1.4.2 b12Fixed
Related Reports
Relates :  
Description
A recent bug, 4485461, attempted to address a problem where JButtons and JTabbedPanes generate a disabled icon once and fail to regenerate them on every call to setIcon(At).

There is a problem witht the fix to JTabbedPane. While correctly nulling the disabled icon field on every call to setIconAt, the fix failed to consider when they would be regenerated. The only place in JTabbedPane where this is done is in insertTab. Therefore, calling setIconAt after inserting a tab, effectively clears the disabledIcon, without regenerating it.

To see this, compile and run the attached code:

Click on "enable/disable". The icon on the tab turns grey.
Click on "enable/disable". The icon on the tab is colorful again.
Click on "Set Icon". The icon changes.
Click on "enable/disable". The icon dissapears (it should be a new grey icon).

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis-beta FIXED IN: mantis-beta INTEGRATED IN: mantis-b12 mantis-beta
24-08-2004

EVALUATION Just found out that setIcon is spec'd to say that it does nothing to the disabled icon. This behavior seems wrong but we can't fix it in mantis. Therefore, I recommend this issue be fixed by simply reverting the change made to JTabbedPane ONLY in 4485461. ###@###.### 2002-11-20
20-11-2002