Это код метода разблокировки:
Код: Выделить всё
@FXML
void unlock(ActionEvent event) throws IOException {
if(txtactivate.getText().equals("qwerty1234")) {
FXMLLoader loader = new FXMLLoader(getClass().getResource("FXMLDocument.fxml"));
loader.load();
FXMLDocumentController fxmlDocumentController = loader.getController();
unlock_btn.getScene().getWindow().hide();
fxmlDocumentController.btnAdd.setDisable(false);
fxmlDocumentController.btnDelete.setDisable(false);
fxmlDocumentController.btnUpdate.setDisable(false);
} else {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Error Message");
alert.setHeaderText(null);
alert.setContentText("Wrong Password!");
alert.showAndWait();
}
}
[img]https://i.sstatic .net/oJwU1rBA.png[/img]
Подробнее здесь: https://stackoverflow.com/questions/786 ... not-enable