JDK-4261420 : Implement mini-tabs in JTabbedPane (4198838 follow-on)
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1999-08-10
  • Updated: 2001-11-15
  • Resolved: 2001-11-15
Related Reports
Duplicate :  
Description

Name: krT82822			Date: 08/10/99


The tabs displayed by JTabbedPane are bulky. There's still a 
bit too much padding (5 pixels on top, 2 at the bottom for a 
tab with no icon) but even without that we have all the beveled 
borders plus the selected tab that takes more space than 
regular tabs so that we have an overhead of 7 pixels (i.e. 
total height of tab is height of text plus 7 pixels of padding 
plus 7 pixels of border and misc overhead).

  With a font of 11 pixels in height Swing tabs take 25 pixels 
(11+7+7 in 1.2.2, 28 in 1.2.1, 11+10+7). Compare this to tabs like the ones 
found in Excel (to select sheets) or Visual Studio (to select 
the log) which, for the exact same font size, take only 15 
pixels (2 pixels of padding, 2 pixels of overhead).

  They don't look the same, I would call them "mini-tabs".

  I would like to be able to set an option on JTabbedPane to 
specify I want mini-tabs instead of the regular tabs. Each look 
and feel would have its own version of mini-tabs in addition to 
the regular tabs (mini vs. regular is not a look and feel issue).

  Alternately one could have a JMiniTabbedPane class which would 
do the mini-tabs. But most of the logic for the layout, 
determining whether there is only one row or more, future code 
to scroll the tabs and so on would be exactly the same anbyway.
So it probably makes more sense to make it an option of 
JTabbedPane.
(Review ID: 93604) 
======================================================================

Comments
EVALUATION You can currently modify a number of these properties via UIManager. I would suggest looking at BasicTabbedPanUI for the properties. In the future we are looking to allow the setting of the component for the tab instead of just creating a label. This is covered in RFE 4499556. Closing this as a duplicate. ###@###.### 2001-11-14
14-11-2001