passwordButton.setText("Remove password");
}
// Set the date picker to show the birthday of this wallet.
Instant creationTime = Instant.ofEpochSecond(seed.getCreationTimeSeconds());
LocalDate origDate = creationTime.atZone(ZoneId.systemDefault()).toLocalDate();
datePicker.setValue(origDate);
// Set the mnemonic seed words.
final List<String> mnemonicCode = seed.getMnemonicCode();
checkNotNull(mnemonicCode); // Already checked for encryption.
String origWords = Joiner.on(" ").join(mnemonicCode);
wordsArea.setText(origWords);
// Validate words as they are being typed.
MnemonicCode codec = unchecked(MnemonicCode::new);
TextFieldValidator validator = new TextFieldValidator(wordsArea, text ->
!didThrow(() -> codec.check(Splitter.on(' ').splitToList(text)))
);
// Clear the date picker if the user starts editing the words, if it contained the current wallets date.
// This forces them to set the birthday field when restoring.
wordsArea.textProperty().addListener(o -> {
if (origDate.equals(datePicker.getValue()))
datePicker.setValue(null);
});
BooleanBinding datePickerIsInvalid = or(
datePicker.valueProperty().isNull(),