JDK-4151638 : Metal L&F: tabcard stacking: first row left-justified, remainder fully-justified
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.0.2
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 1998-06-23
  • Updated: 1998-09-16
  • Resolved: 1998-09-16
Related Reports
Relates :  
when you have enough tabs that they don't fit into a single row (this is in the normal tabs-on-top configuration),

the tabs in the first row are sized to fit their text, but the tabs in remaining rows are expanded to fit the width of the window.

the resulting visual effect is that the first row is "left justified" while the remaining rows are "fully justified".

clearly, when not even one full row is needed, you'd want to left-justify the tabs.  However, when there are more than one full row of tabs, it looks odd to do this only for the first row.

why not fully justify all rows if there are more than one, for a neat block-like appearance?

Chris Ryan's Metal L&F spec does not specify how tabs should "justify".  It shows some stacked tabs in a few places, but only for illustrating how they should be colored and highlighted when selected; it does not describe the overall appearance of the collection of tabs under multi-row situations.  The L&F spec should probably define this stuff, and then Metal fixed to "follow the spec".

to reproduce, try SwingSet with Metal L&F, and shrink the window to half its initial size.  This is particularly ugly on applications like JavaModeler, which employs only 3 or 4 tabs, where the difference between the 1st and 2nd rows of tabs is significant.  To see the problem in JavaModeler, launch /net/javahouse/export/javahouse/products/demos/phoenix/javamodeler.22jundemo/run.solaris and observe the left side of the window.

EVALUATION The tabs behave correctly and according to spec. The aesthetic effect of justifying a small number of tabs in the top row is considered worse than left justification, which also corresponds more closely to the real-world metaphor of filing tabs. It should be noted that tabbed panes with multiple rows of tabs is not considered good design practice, as the user is confronted with too many choices in a relatively difficult to read format; the forthcoming HI Guidelines may make this explicit. Certainly tabbed panes should be used only in limited instances such as preference panels--never for navigation within the application, as the SwingSet demo unfortunately does.