final DCPanel userRegistrationPanel = new DCPanel().setTitledBorder("User registration");
userRegistrationPanel.add(DCLabel.dark("Logged in as:"));
userRegistrationPanel.add(usernameTextField);
userRegistrationPanel.add(logoutButton);
final FilenameTextField saveDatastoreDirectoryField = new FilenameTextField(
_userPreferences.getSaveDatastoreDirectory(), true);
saveDatastoreDirectoryField.setFile(_userPreferences.getSaveDatastoreDirectory());
saveDatastoreDirectoryField.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
saveDatastoreDirectoryField.addFileSelectionListener(new FileSelectionListener() {
@Override
public void onSelected(FilenameTextField filenameTextField, File file) {
_userPreferences.setSaveDatastoreDirectory(file);
}
});