boolean (@NotNull ContentManager manager, final @NotNull JComponent contentComponent, boolean requestFocus) { for (Content content : manager.getContents()) { if (content instanceof TabbedContentImpl) { boolean found = ((TabbedContentImpl)content).findAndSelectContent(contentComponent); if (found) { manager.setSelectedContent(content, requestFocus); return true; } } else if (Comparing.equal(content.getComponent(), contentComponent)) { manager.setSelectedContent(content, requestFocus); return true; } } return false; }