ExtendableTextField () { SearchField res = new SearchField() { @Override public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new TextFieldWithListAccessibleContext(this, myResultsList.getAccessibleContext()); } return accessibleContext; } }; ExtendableTextComponent.Extension leftExt = new ExtendableTextComponent.Extension() { @Override public Icon getIcon(boolean hovered) { return isExtendedInfoEnabled() ? AllIcons.Actions.SearchWithHistory : AllIcons.Actions.Search; } @Override public boolean isIconBeforeText() { return true; } @Override public int getIconGap() { return JBUIScale.scale(ExperimentalUI.isNewUI() ? 6 : 10); } @Override public Runnable getActionOnClick() { if (!isExtendedInfoEnabled()) return null; Rectangle bounds = ((TextFieldWithPopupHandlerUI)mySearchField.getUI()).getExtensionIconBounds(this); Point point = bounds.getLocation(); point.y += bounds.width + JBUIScale.scale(2); RelativePoint relativePoint = new RelativePoint(mySearchField, point); return () -> showPopup(relativePoint); } }; res.addExtension(leftExt); res.putClientProperty(SEARCH_EVERYWHERE_SEARCH_FILED_KEY, true); res.setLayout(new BorderLayout()); return res; }