TabbedPane: disable all items in "Show Hidden Tabs" popup menu if tabbed pane is disabled

This commit is contained in:
Karl Tauber
2022-03-17 12:42:49 +01:00
parent 53f2730064
commit 0bf87b753d
2 changed files with 3 additions and 1 deletions

View File

@@ -2016,7 +2016,7 @@ public class FlatTabbedPaneUI
menuItem.setOpaque( true );
}
if( !tabPane.isEnabledAt( tabIndex ) )
if( !tabPane.isEnabled() || !tabPane.isEnabledAt( tabIndex ) )
menuItem.setEnabled( false );
menuItem.addActionListener( e -> selectTab( tabIndex ) );