ActionToolbarImpl (ActionGroup actionGroup) { ActionToolbarImpl actionToolbar = new ActionToolbarImpl(ActionPlaces.WELCOME_SCREEN, actionGroup, true) { private boolean wasFocusRequested = false; @Override protected void actionsUpdated(boolean forced, @NotNull List<? extends AnAction> newVisibleActions) { super.actionsUpdated(forced, newVisibleActions); if (forced && !newVisibleActions.isEmpty() && getComponents().length > 0 && !wasFocusRequested) { Component obj = FocusUtil.findFocusableComponentIn(getComponents()[0], null); if (obj != null) { wasFocusRequested = true; IdeFocusManager.getGlobalInstance().requestFocus(obj, true); } } } }; actionToolbar.setLayoutPolicy(ActionToolbar.NOWRAP_LAYOUT_POLICY); actionToolbar.setTargetComponent(actionToolbar.getComponent()); actionToolbar.setBorder(JBUI.Borders.emptyTop(27)); actionToolbar.setTargetComponent(actionToolbar.getComponent()); actionToolbar.setOpaque(false); return actionToolbar; }