JDK-8046209 : See JDK-7151452: JTabbedPane -> SCROLL_TAB_LAYOUT -> minimum/preferred size
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_7
  • CPU: x86
  • Submitted: 2014-06-05
  • Updated: 2022-02-11
  • Resolved: 2022-02-11
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.
Other
tbdResolved
Related Reports
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :


A DESCRIPTION OF THE PROBLEM :
Ocurred in jdk 1.6.0_21 but seems to be inherent for me in jdk 1.8

BasicTabbedPaneUI does not take the tabAreaInsets into consideration, calculating the preferredTabAreaHeight/Width when getTabLayoutPolicy() == SCROLL_TAB_LAYOUT

Replacing BasicTabbedPaneUI.TabbedPaneScrollLayout

        protected int preferredTabAreaHeight(int tabPlacement, int width) {
            return calculateMaxTabHeight(tabPlacement);
        }

        protected int preferredTabAreaWidth(int tabPlacement, int height) {
            return calculateMaxTabWidth(tabPlacement);
        }

with

        protected int preferredTabAreaHeight(int tabPlacement, int width) {
            int maxTabHeight = calculateMaxTabHeight(tabPlacement);
            return calculateTabAreaHeight(tabPlacement, 1, maxTabHeight);
        }

        protected int preferredTabAreaWidth(int tabPlacement, int height) {
            int maxTabWidth = calculateMaxTabWidth(tabPlacement);
            return calculateTabAreaWidth(tabPlacement, 1, maxTabWidth);
        }

may fix this.


REPRODUCIBILITY :
This bug can be reproduced always.