JDK-6648556 : Inserting Box.createHorizontalGlue() to JTollBar on Nimbus doesn't work
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u5
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2008-01-09
  • Updated: 2011-02-16
  • Resolved: 2008-02-15
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_10-ea"
Java(TM) SE Runtime Environment (build 1.6.0_10-ea-b09)
Java HotSpot(TM) Client VM (build 11.0-b09, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Wersja 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
Inserting Box.createHorizontalGlue() to JTollBar on Nimbus doesn't work. On other layouts work ok. When I'm using this glue with other lauouts, components added after this glue is aligned to right border, nimbus ignore this glue.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Add to JFrame JTollBar ane add first JButton, next add Box.createHorizontalGlue(), and add secons JButton

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Second JButton is aligned to the right border of the window
ACTUAL -
Second JButton is aligned near to the first button

REPRODUCIBILITY :
This bug can be reproduced always.

Comments
EVALUATION JToolBar has the DefaultToolBarLayout which is wrapper on BoxLayout, this is an implementation detail and we actually don't specify it, but I it would be better to make it work consistently through all Lafs if there is no strong objections
15-01-2008