JDK-6661618 : Nimbus L&F: JToolBar - Issues
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u5,6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows_xp,windows_vista
  • CPU: generic,x86
  • Submitted: 2008-02-11
  • Updated: 2011-02-16
  • Resolved: 2008-03-05
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
6u10 b13Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
Nimbus L&F: JToolBar - Separator line is short when position left/right

1. JToolBar - Separator line is short when position left/right. Refer JToolbar-Left
2. JToolBar - Outline line is missing when place at the bottom/right. Compare the JToolBar-Top and JToolBar-Bottom.

Screen Shot got using Laffy.
3. Inserting Box.createHorizontalGlue() to JTollBar on Nimbus doesn't work
4. Spinner & Editable JCombobox touches the border of the JToolbar

Comments
EVALUATION 1. JToolBar - Separator line is short when position left/right This was fixed by adding a custom painter for toolbar separators. The problem is that our designer tool doesn't allow for tiled painting yet, so we needed a custom painter to do this. 2. JToolBar - Outline line is missing when place at the bottom/right And the line is in the wrong place when positioned left. To fix this bug I had to add 4 custom states for JToolBar to dectect which side of the screen it is on, so that I could then render the border on the correct side of the toolbar. 3. Inserting Box.createHorizontalGlue() to JTollBar on Nimbus doesn't work This is not strictly a bug, but an RFE. We decided to support this feature. JToolBar, by default, uses a BoxLayout as its layout manager. Synth uses a custom layout manager. In some ways we prefer the synth one (by default, it looks better). However, in many ways we'd like Nimbus to be a drop-in replacement for Metal. In this case we decided that since by default it looks hideous in Metal, that we'd rather that new apps by default look good in Nimbus. Therefore, we compromised. While we are not going to make the Synth layout manager the same as that used in Metal and the other LAFs, we are going to support "glue" created via Box.createHorizontalGlue(). This support was added directly to the Synth layout manager for toolbars. 4. Spinner & Editable JCombobox touches the border of the JToolbar Simply added some insets to the toolbar. I had to mess with a few fiddly bits in NimbusIcon to get the icon to paint properly with the insets and border, but it should all now paint properly and look decent.
15-02-2008