fixed PY-13562 New Project: there is no focus in project location

This commit is contained in:
Ekaterina Tuzova
2014-08-01 15:33:58 +04:00
parent 1ec198c7cc
commit a0966e3b36
@@ -108,7 +108,14 @@ abstract public class AbstractProjectSettingsStep extends AbstractActionWithPane
@Override
public JPanel createPanel() {
final JPanel mainPanel = new JPanel(new BorderLayout());
final JPanel basePanel = createBasePanel();
final JPanel mainPanel = new JPanel(new BorderLayout()) {
@Override
protected void paintComponent(Graphics g) {
myLocationField.requestFocus();
}
};
final JPanel scrollPanel = new JPanel(new BorderLayout());
final DirectoryProjectGenerator[] generators = Extensions.getExtensions(DirectoryProjectGenerator.EP_NAME);
@@ -118,8 +125,7 @@ abstract public class AbstractProjectSettingsStep extends AbstractActionWithPane
myErrorLabel.setForeground(JBColor.RED);
myCreateButton = new Button(myCreateAction, myCreateAction.getTemplatePresentation());
final JPanel panel = createBasePanel();
scrollPanel.add(panel, BorderLayout.NORTH);
scrollPanel.add(basePanel, BorderLayout.NORTH);
final JPanel advancedSettings = createAdvancedSettings();
if (advancedSettings != null) {
scrollPanel.add(advancedSettings, BorderLayout.CENTER);
@@ -131,7 +137,6 @@ abstract public class AbstractProjectSettingsStep extends AbstractActionWithPane
final JPanel bottomPanel = new JPanel(new BorderLayout());
bottomPanel.add(myErrorLabel, BorderLayout.NORTH);
bottomPanel.add(myCreateButton, BorderLayout.EAST);
mainPanel.add(bottomPanel, BorderLayout.SOUTH);