JDK-6416920 : REGRESSION: JTabbed pane title is not seen in scroll tab layout in WindowsLookAndFeel
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0,6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows_vista
  • CPU: generic,x86
  • Submitted: 2006-04-24
  • Updated: 2011-01-26
  • Resolved: 2006-06-14
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
6 b88Fixed
Related Reports
Duplicate :  
Relates :  
Description
Step to reproduce:
----------------
1) Run the attached program.
2) Select 'Scroll tab layout' radio button.You can see the tabs are placed in a row & two arrows at the right side.
3) Select Jtab#1 to 'n' say tab#13 & tab#14 by clicking on the right arrow button. On selecting tab#14 the title come out side the tab. If you see the same then the bug is reproduce. 
4) Select any tab after tab#14. The tab are not seen, but the contents of the tabs are seen.

You can described issues with the attached  screen shots. 
I tested this on Vista beta2 (build 5342) on Mustang b81.
If you click the last tab, then the arrow buttons are disappers.

Comments
SUGGESTED FIX The main idea of the fix is to exclude the regressioning code for the scroll tabbed layout case. See http://sa.sfbay.sun.com/projects/swing_data/mustang/6416920/
19-05-2006

EVALUATION I found the cause: it is a regression of the fix for the 6395416 bug (see BasicTabbedPaneUI.padSelectedTab() lines 2827 - 2852). The width of the selected tab in the rects array becomes negative. The code doesn't take in account that viewable width of JTabbedPane can be less than it's size in the case when scroll tab layout is used.
18-05-2006

EVALUATION I can reproduce this problem on WinXP on latest mustang build. run : java.exe -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel JTabbedPaneDemo100 and follow the steps from the description. Reassigning to JTabbedPane owner and removing swing-vista keyword
03-05-2006

EVALUATION There is no test for the bug rep. Could you please provide one?
03-05-2006