From 8ffc3bfb2b47217caab5c4918a6b9a427c1d093f Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Tue, 24 Jan 2017 10:28:04 +0300 Subject: [PATCH] IDEA-166188 The label is located lower than it should --- .../intellij/ide/projectWizard/ProjectSettingsStep.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectSettingsStep.java b/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectSettingsStep.java index 75d04629c0ae..a5f20635d616 100644 --- a/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectSettingsStep.java +++ b/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectSettingsStep.java @@ -112,13 +112,10 @@ public class ProjectSettingsStep extends ModuleWizardStep implements SettingsSte mySettingsPanel.repaint(); } - private static int restorePanel(JPanel component, int i) { - int removed = 0; + private static void restorePanel(JPanel component, int i) { while (component.getComponentCount() > i) { component.remove(component.getComponentCount() - 1); - removed++; } - return removed; } @Override @@ -194,7 +191,7 @@ public class ProjectSettingsStep extends ModuleWizardStep implements SettingsSte static void addField(String label, JComponent field, JPanel panel) { JLabel jLabel = new JBLabel(label); jLabel.setLabelFor(field); - panel.add(jLabel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0, 0, GridBagConstraints.CENTER, + panel.add(jLabel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, JBUI.insetsBottom(5), 4, 0)); panel.add(field, new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, JBUI.insetsBottom(5), 0, 0));