Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag
Created October 10, 2019 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BMU-Verlag/69e99fde2beb7b38333887432cc3ec09 to your computer and use it in GitHub Desktop.
Save BMU-Verlag/69e99fde2beb7b38333887432cc3ec09 to your computer and use it in GitHub Desktop.
@FXML
void prepareOperation(ActionEvent event) {
if (event.getSource() == add) {
this.nextOperation = Operation.ADD;
} else if (event.getSource() == subtract) {
this.nextOperation = Operation.SUBTRACT;
} else if (event.getSource() == multiply) {
this.nextOperation = Operation.MULTIPLY;
} else if (event.getSource() == divide) {
this.nextOperation = Operation.DIVIDE;
}
lastResult.setText(input.getText());
input.setText("");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment