mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 06:57:13 -06:00
TabbedPane: fixed NPE in scroll layout when removing last tab
This commit is contained in:
@@ -1844,6 +1844,13 @@ public class FlatTabbedPaneUI
|
||||
if( !useMoreButton && (backwardButton == null || forwardButton == null) )
|
||||
return; // should never occur
|
||||
|
||||
if( rects.length == 0 ) {
|
||||
moreTabsButton.setVisible( false );
|
||||
backwardButton.setVisible( false );
|
||||
forwardButton.setVisible( false );
|
||||
return;
|
||||
}
|
||||
|
||||
Rectangle bounds = tabPane.getBounds();
|
||||
Insets insets = tabPane.getInsets();
|
||||
int tabPlacement = tabPane.getTabPlacement();
|
||||
|
||||
Reference in New Issue
Block a user