boolean () { final JComponent preferredFocusedComponent = IdeFocusTraversalPolicy.getPreferredFocusedComponent(myWrapper.myTabbedPane.getComponent()); if (preferredFocusedComponent != null) { if (!preferredFocusedComponent.requestFocusInWindow()) { IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(preferredFocusedComponent, true)); } return true; } return super.requestDefaultFocus(); }