void (@NotNull Container container, JComponent comp) { FocusTraversalPolicy policy = container.getFocusTraversalPolicy(); if (policy != null) { Component next = policy.getComponentAfter(container, comp); if (next != null) { IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(next, true)); } } }