Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8046209

See JDK-7151452: JTabbedPane -> SCROLL_TAB_LAYOUT -> minimum/preferred size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • tbd
    • 8
    • client-libs

      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.

            psadhukhan Prasanta Sadhukhan
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: