Initialize text field and buttons correctly.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 22 Dec 2009 06:06:21 +0000 (07:06 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 22 Dec 2009 06:06:21 +0000 (07:06 +0100)
src/de/todesbaum/jsite/gui/PreferencesPage.java

index 03910eb..22b478a 100644 (file)
@@ -195,6 +195,13 @@ public class PreferencesPage extends TWizardPage {
                customTempDirectory.getModel().setGroup(tempDirectoryButtonGroup);
 
                tempDirectoryTextField = new JTextField();
+               tempDirectoryTextField.setEditable(false);
+               if (tempDirectory != null) {
+                       tempDirectoryTextField.setText(tempDirectory);
+                       customTempDirectory.setSelected(true);
+               } else {
+                       defaultTempDirectory.setSelected(true);
+               }
                tempDirectoryPanel.add(tempDirectoryTextField, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 6, 0, 0), 0, 0));
 
                JButton chooseButton = new JButton(chooseTempDirectoryAction);