Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag
Created October 10, 2019 15:41
Show Gist options
  • Save BMU-Verlag/5bce350dbeebd791619822b8d2a83a9f to your computer and use it in GitHub Desktop.
Save BMU-Verlag/5bce350dbeebd791619822b8d2a83a9f to your computer and use it in GitHub Desktop.
@FXML
private void handleInput(ActionEvent event) {
var newCharacter = ((Button) event.getSource()).getText();
if (input.getText().contains(",") && newCharacter.equals(",")) {
return;
}
input.setText(input.getText() + newCharacter);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment