JDK-6461064 : REGRESSION: XP L&F, jdk 1.5.0_08 or 1.5.0_09 preferred size of JToggleButton in JToolbar is wrong.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-08-17
  • Updated: 2010-04-02
  • Resolved: 2006-08-17
Related Reports
Duplicate :  
running jdk 1.5.0_08 or 1.5.0_09, only on winxp l&f.
when running the attached application (by typing ant run in the project's root directory) there is one toggle button with dots instead of the text (too small width of the button) and other two buttons which are too wide.

The problem is that *after* adding the toggle button into toolbar, calling button.setPrefferedSize(button.getPrefferedSize()) sets the width of the button smaller then needed.

When calling button.setPrefferedSize(button.getPrefferedSize()) *before* adding toggle button into toolbar, width is set bigger then needed.

This is the same issue as was in JDK 1.6, number 6349010

EVALUATION Will backport 6349010. Closing as a duplicate and opening a SubCR of 6349010.