JPanel leinPanel = new JPanel(new FormLayout("80dlu, fill:80dlu:grow, 20dlu, 80dlu", "p,p,p"));
CellConstraints c = new CellConstraints();
int row = 1;
leinPanel.add(new JBLabel("Leiningen executable:"), c.xy(1,row));
this.leinBinSelectorField = new TextFieldWithBrowseButton();
leinBinSelectorField
.addBrowseFolderListener("Select the Leiningen executable", "'lein' on Linux/MacOS, 'lein.bat' on Windows. ", null,
new FileChooserDescriptor(true, false, false, false, false, false));
leinPanel.add(leinBinSelectorField, c.xy(2,row));
row++;
leinPanel.add(new JBLabel("Leiningen Home:"), c.xy(1,row));
this.leinHomeSelectorField = new TextFieldWithBrowseButton();
leinHomeSelectorField
.addBrowseFolderListener("Select the Leiningen home directory", "usually at $USER_HOME/.lein", null,
new FileChooserDescriptor(false, true, false, false, false, false));
leinPanel.add(leinHomeSelectorField, c.xy(2,row));
this.overrideLeinHome = new JBCheckBox();
leinPanel.add(overrideLeinHome, c.xy(3,row));
leinPanel.add(new JBLabel("Override"), c.xy(4,row));
row++;
leinPanel.add(new JBLabel("Leiningen Jar:"), c.xy(1,row));
this.leinJarSelectorField = new TextFieldWithBrowseButton();
leinJarSelectorField
.addBrowseFolderListener("Select the Leiningen Jar", "usually at $USER_HOME/.lein/self-installs/leinigen-VERSION-standalone.jar", null,
new FileChooserDescriptor(true, false, true, true, false, false));
leinPanel.add(leinJarSelectorField, c.xy(2,row));
this.overrideLeinJar = new JBCheckBox();
leinPanel.add(overrideLeinJar, c.xy(3,row));
leinPanel.add(new JBLabel("Override"), c.xy(4,row));
outerPanel.add(leinPanel, BorderLayout.NORTH);
myWatcher = new UserActivityWatcher();
myWatcher.register(outerPanel);