<Swing Dev> RFR JDK-8178028: Typing 'C' cannot change the tab layout to WRAP_TAB_LAYOUT

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Fri Apr 17 15:04:19 UTC 2020


Hi All,

Please review a test fix for an issue where it is seen that JTabbedPane 
tabLayoutPolicy was not getting changed from SCROLL_TAB_LAYOUT to 
WRAP_TAB_LAYOUT.

This is because the test creates only 5 tabs which fits on the window 
whereas the JTabbedPane.WRAP_TAB_LAYOUT spec says

"The tab layout policy for wrapping tabs in multiple runs when all tabs 
will not fit within a single run"

so I fixed it by creating multiple tabs which will not fit on screen, so 
now toggling between SCROLL_TAB_LAYOUT and WRAP_TAB_LAYOUT policy causes 
the tabs to

either show only subset of tabs or wrap tabs into multiple lines 
respectively.

Also, the subtest of typing "C" to test WRAP_TAB_LAYOUT policy is moved 
to 1st subtest as currently the test is after "L" which is LEFT tab 
placement so the tabs will be aligned vertically,

which will again cause the tabs to fit on window, causing *TAB_LAYOUT 
policy to not work.

Bug: https://bugs.openjdk.java.net/browse/JDK-8178028

webrev: http://cr.openjdk.java.net/~psadhukhan/8178028/webrev.0/

Regards
Prasanta


More information about the swing-dev mailing list