void (Project project, @NlsSafe String initialText, boolean classMode) { myTabbedPane = new TabbedPaneWrapper(getDisposable()); MavenArtifactSearchPanel.Listener listener = new MavenArtifactSearchPanel.Listener() { @Override public void itemSelected() { clickDefaultButton(); } @Override public void canSelectStateChanged(@NotNull MavenArtifactSearchPanel from, boolean canSelect) { myOkButtonStates.put(from, canSelect); updateOkButtonState(); } }; myArtifactsPanel = new MavenArtifactSearchPanel(project, !classMode ? initialText : "", false, listener, this, myManagedDependenciesMap); myClassesPanel = new MavenArtifactSearchPanel(project, classMode ? initialText : "", true, listener, this, myManagedDependenciesMap); myTabbedPane.addTab(MavenDomBundle.message("maven.search.for.artifact.tab.title"), myArtifactsPanel); myTabbedPane.addTab(MavenDomBundle.message("maven.search.for.class.tab.title"), myClassesPanel); myTabbedPane.setSelectedIndex(classMode ? 1 : 0); myTabbedPane.getComponent().setPreferredSize(JBUI.size(900, 600)); myTabbedPane.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { updateOkButtonState(); } }); updateOkButtonState(); }