void () { myMainPanel = new JPanel(new GridBagLayout()); myTabbedPane = new TabbedPaneWrapper(myDisposable); for (OrderRootType type : OrderRootType.getAllTypes()) { if (showTabForType(type)) { final SdkPathEditor pathEditor = OrderRootTypeUIFactory.FACTORY.getByKey(type).createPathEditor(mySdk); if (pathEditor != null) { pathEditor.setAddBaseDir(mySdk.getHomeDirectory()); myTabbedPane.addTab(pathEditor.getDisplayName(), pathEditor.createComponent()); myPathEditors.put(type, pathEditor); } } } myTabbedPane.addChangeListener(e -> myHistory.pushQueryPlace()); myHomeComponent = createHomeComponent(); final JTextField textField = myHomeComponent.getTextField(); textField.setEditable(false); textField.addHierarchyListener(new HierarchyListener() { @Override public void hierarchyChanged(HierarchyEvent e) { if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) == 0 || !textField.isShowing()) { return; } checkHomePathValidity(); } }); myHomeFieldLabel = new JLabel(getHomeFieldLabelValue()); myHomeFieldLabel.setLabelFor(myHomeComponent.getTextField()); myMainPanel.add(myHomeFieldLabel, new GridBagConstraints( 0, GridBagConstraints.RELATIVE, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, JBUI.insets(2, 10, 2, 2), 0, 0)); myMainPanel.add(myHomeComponent, new GridBagConstraints( 1, GridBagConstraints.RELATIVE, 2, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, JBUI.insets(2, 2, 2, 10), 0, 0)); myAdditionalDataPanel = new JPanel(new BorderLayout()); myMainPanel.add(myAdditionalDataPanel, new GridBagConstraints( 0, GridBagConstraints.RELATIVE, 3, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, JBUI.insets(2, 10, 0, 10), 0, 0)); myMainPanel.add(myTabbedPane.getComponent(), new GridBagConstraints( 0, GridBagConstraints.RELATIVE, 3, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, JBUI.insetsTop(2), 0, 0)); myDownloadingPanel = new JPanel(new BorderLayout()); //myDownloadingPanel.add(new JBLabel("Downloading JDK..."), BorderLayout.NORTH); myDownloadProgressIndicator = new TwoLineProgressIndicator(true); myDownloadProgressIndicator.setIndeterminate(true); myDownloadingPanel.add(myDownloadProgressIndicator.getComponent(), BorderLayout.NORTH); myDownloadProgressIndicator.getComponent().setMaximumSize(JBUI.size(300, 200)); myMainPanel.add(myDownloadingPanel, new GridBagConstraints( 0, GridBagConstraints.RELATIVE, 2, 1, 0, 1.0, GridBagConstraints.SOUTH, GridBagConstraints.BOTH, JBUI.insets(8, 10, 0, 10), 0, 0)); }