JDK-4466014 : BasicUI delegates explicitly mention BasicLookAndFeel
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2001-06-04
  • Updated: 2003-08-11
  • Resolved: 2003-08-11
Related Reports
Duplicate :  
Description

Name: bsC130419			Date: 06/04/2001


java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)


In JDK1.4beta, the following BasicXXXUI classes explicitly cast the LookAndFeel
to BasicLookAndFeel (for sound action support):

BasicInternalFrameUI
BasicMenuItemUI
BasicOptionPaneUI
BasicPopupMenuUI

More importantly, they do so in private or package access methods, which can not
be replaced without rewriting some higher level methods.


In previous releases of Swing, it was possible to use the BasicUI classes even
if one did not use BasicLookAndFeel, since they did not refer to it. With 1.4,
these LAFs are now broken (ClassCastExceptions during startup break them
immediately).

Please make the references either easily replacable (so that subclasses of
BasicUI delegates can still be used in custom UIs), optional (instanceof), or
move the necessary methods into LookAndFeel directly.

This would greatly simplify development of custom LookAndFeels.
(Review ID: 125737) 
======================================================================

Comments
EVALUATION While this is not a typical usage of the UI, this should be fixed. I'm classifying this as a bug. ###@###.### 2001-11-12 A cleanup was done as part of 4632193 that removed these calls. ###@###.### 2003-08-11
12-11-2001