You have to add @FXML
before your Button
as well.
Like this:
@FXML
private Label label;
@FXML
private Button startGameButton;
@FXML
private void startGame (ActionEvent event) {
label.setText("Ok. Let's begin.");
startGameButton.setVisible(false);
}