From: David ‘Bombe’ Roden Date: Tue, 22 Dec 2009 06:06:21 +0000 (+0100) Subject: Initialize text field and buttons correctly. X-Git-Tag: 0.8~22 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c00ddf5d52a5ce4631d8fe7a5d229003e75808b2;p=jSite.git Initialize text field and buttons correctly. --- diff --git a/src/de/todesbaum/jsite/gui/PreferencesPage.java b/src/de/todesbaum/jsite/gui/PreferencesPage.java index 03910eb..22b478a 100644 --- a/src/de/todesbaum/jsite/gui/PreferencesPage.java +++ b/src/de/todesbaum/jsite/gui/PreferencesPage.java @@ -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);