JDK-6653165 : api/javax_swing/plaf/basic/BasicInternalFrameUI/index.html#protected fails 6u10 under plugin
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • CPU: generic
  • Submitted: 2008-01-21
  • Updated: 2012-03-22
  • Resolved: 2008-03-12
Related Reports
Duplicate :  
JCK            : JCK-runtime-6a b14
J2SE           : FAIL - jdk6u10 build 10 Kernel JRE under IE 6 and 7.
Platform[s]    : FAIL - windows XP Home and Pro
switch/Mode    : FAIL - default

Test api/javax_swing/plaf/basic/BasicInternalFrameUI/index.html#protected fails under both old and new plugin for 6u10 b10 kernel JRE bundle.
suggested code

	try {
            UIManager.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel());
        } catch (UnsupportedLookAndFeelException e) {

fixes the problem.
The bug is reproducible only with "Windows XP" desktop theme.

EVALUATION Sorry - i was terribly wrong. This change of the default LAF is a regression and has been fixed as 6653395.

EVALUATION Peter Zhelezniakov said that he is confident that the plugin in Consumer JRE uses system LaF by default. It is a new feature.


EVALUATION Maybe, the bug caused by recent fix for 6594219 by Peter Zhelezniakov. He rewritten DeployUIManager.setLookAndFeel() recently. However, it seems that he didn't change the LaF selection algorithm. I looked into SCCS history. It looks like native LaFs should be used by default on gnome and windows. It is strange that Metal LaF was used as default LaF before 6u10b10.

EVALUATION I managed to print stack trace when the "swing.defaultlaf" property is initialized with the wrong value: at java.lang.System.setProperty(Unknown Source) at com.sun.deploy.util.DeployUIManager.setLookAndFeel(Unknown Source) at com.sun.deploy.util.DeployUIManager.setLookAndFeel(Unknown Source) at sun.plugin.util.PluginSysUtil$1.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

EVALUATION Alex is right. I found the cause. Somehow in plugin "swing.defaultlaf" property appears among the default System properties. It equals "com.sun.java.swing.plaf.windows.WindowsLookAndFeel". It causes Swing to use Windows LaF by default for applets.

EVALUATION It looks like 6u10 set the native LookAndFeel by default when in plugin, so I'll ask submitter to verify that and downgrade the priority until he answers