JPanel () { if (myProjectGenerator instanceof PythonProjectGenerator) { final BorderLayout layout = new BorderLayout(); final JPanel locationPanel = new JPanel(layout); final JPanel panel = new JPanel(new VerticalFlowLayout(0, 2)); final LabeledComponent<TextFieldWithBrowseButton> location = createLocationComponent(); locationPanel.add(location, BorderLayout.CENTER); panel.add(locationPanel); panel.add(createInterpretersPanel(((PythonProjectGenerator<?>)myProjectGenerator).getPreferredEnvironmentType())); final JPanel basePanelExtension = ((PythonProjectGenerator<?>)myProjectGenerator).extendBasePanel(); if (basePanelExtension != null) { panel.add(basePanelExtension); } return panel; } return super.createBasePanel(); }