void (@NotNull AnActionEvent e) { Disposable disposable = Disposer.newDisposable(); Project project = e.getRequiredData(CommonDataKeys.PROJECT); RecentProjectFilteringTree recentProjectFilteringTree = RecentProjectPanelComponentFactory.createComponent( disposable, List.of(ProjectCollectors.createRecentProjectsWithoutCurrentCollector(project)) ); Tree recentProjectTree = recentProjectFilteringTree.getTree(); TreeUtil.selectFirstNode(recentProjectTree); SearchTextField searchTextField = recentProjectFilteringTree.installSearchField(); searchTextField.setBorder(JBUI.Borders.customLineBottom(WelcomeScreenUIManager.getSeparatorColor())); JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(recentProjectTree, true); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); ComponentContainer componentContainer = new ComponentContainer() { private final JBTextField textField = searchTextField.getTextEditor(); @Override public @NotNull JComponent getComponent() { JPanel panel = new JPanel(null); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); panel.setBackground(WelcomeScreenUIManager.getProjectsBackground()); panel.setFocusTraversalPolicy(new ListFocusTraversalPolicy( Arrays.asList(textField, recentProjectTree) )); panel.setFocusTraversalPolicyProvider(true); panel.setFocusCycleRoot(true); panel.add(searchTextField); panel.add(scrollPane); panel.setPreferredSize(JBUI.size(DEFAULT_POPUP_WIDTH, DEFAULT_POPUP_HEIGHT)); return panel; } @Override public JComponent getPreferredFocusableComponent() { return textField; } @Override public void dispose() { } }; PopupUtil.applyNewUIBackground(componentContainer.getComponent()); JBPopup popup = JBPopupFactory.getInstance() .createComponentPopupBuilder(componentContainer.getComponent(), componentContainer.getPreferredFocusableComponent()) .setTitle(IdeUICustomization.getInstance().projectMessage("popup.title.recent.projects")) .setFocusable(true) .setRequestFocus(true) .setDimensionServiceKey(null, "manage.recent.projects.popup", false) .setMovable(true) .setResizable(true) .setNormalWindowLevel(true) .createPopup(); Disposer.register(popup, disposable); popup.showCenteredInCurrentWindow(project); }