Skip to content

Commit

Permalink
TabbedPane: fixed ArrayIndexOutOfBoundsException in case of using "…
Browse files Browse the repository at this point in the history
…card" tab type and using a custom tab selection model that returns -1 for selected tab (issue #875)
  • Loading branch information
DevCharly committed Aug 2, 2024
1 parent 948decb commit ec4343e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@ protected void paintContentBorder( Graphics g, int tabPlacement, int selectedInd
w - (ci.left / 100f) - (ci.right / 100f), h - (ci.top / 100f) - (ci.bottom / 100f) ), false );

// add gap for selected tab to path
if( getTabType() == TAB_TYPE_CARD ) {
if( getTabType() == TAB_TYPE_CARD && selectedIndex >= 0 ) {
float csh = scale( (float) contentSeparatorHeight );

Rectangle tabRect = getTabBounds( tabPane, selectedIndex );
Expand Down

0 comments on commit ec4343e

Please sign in to comment.