JDK-6631956 : Nimbus: ClassCastException when running with MultiLookAndFeel
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris_10
  • CPU: generic,sparc
  • Submitted: 2007-11-20
  • Updated: 2012-03-22
  • Resolved: 2010-05-03
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 6
6u21 b04Fixed
Related Reports
Duplicate :  
Description
When using Nimbus with MultiLookAndFeel (triggered by adding an Axiliary L&F), a ClassCastException is thrown. Presumably, Nimbus is not aware of MultiLookAndFeel.

Sample code to reproduce the bug is available at:
http://www.pbjar.org/Nimbus/NimbusBug.jar
(attached)

It contains source code and the compiled class files and is a runnable jar file.

Steps to reproduce the problem:
- Install Java 6uN Early Access.
- Run bug.nimbus.BugSample (or execute the jar file) and select the Nimbus L&F from the menu.

Comments
EVALUATION Synth's DefaultMenuLayout assumes UI is always SynthPopupMenuUI so it does a blind cast. It needs to be made aware of MultiUIs.
19-03-2010