JDK-6605130 : Nimbus L&F: JTable sort arrow button must be right justified
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u5
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2007-09-14
  • Updated: 2011-02-16
  • Resolved: 2008-02-04
Related Reports
Duplicate :  
Description
JTable sort arrow button must be right justified.  Right now, it is trailing after the header label.

Please see the attached screen shot from SwingSet2.

Comments
EVALUATION SynthTableHeaderUI creates and installs a header renderer which subclasses DefaultTableCellHeaderRenderer. The default implementation uses a single label for the renderer. Synth then specifies that the text in that label should come before the icon. Thus, the sort arrow icon that is painted is simply painted immediately after the text, since this is what JLabel does. This bug is therefore related to a class of bugs which all have at their root the fact that the default renderers do not delegate to the LAF as I believe they should. If DefaultTableCellHeaderRenderer delegated to some SynthDefaultTableCellHeaderRendererUI, then I could very easily alter the code to place the icon in a custom location (in this case, at the far right of the column).
18-10-2007

EVALUATION SynthTableHeaderUI creates and installs a header renderer which subclasses Default
18-10-2007