-
Bug
-
Resolution: Duplicate
-
P4
-
8
-
x86
-
windows_7
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.
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.
- duplicates
-
JDK-8215396 JTabbedPane preferred size calculation is wrong for SCROLL_TAB_LAYOUT
-
- Resolved
-
- relates to
-
JDK-8215396 JTabbedPane preferred size calculation is wrong for SCROLL_TAB_LAYOUT
-
- Resolved
-