how to make a button disapear on click in javafx

Solutions on MaxInterview for how to make a button disapear on click in javafx by the best coders in the world

showing results for - "how to make a button disapear on click in javafx"
Viktoria
31 Sep 2020
1public void letterChosen(ActionEvent event) {
2    Button source = (Button) event.getSource();
3    source.setVisible(false);
4    System.out.println("pick: "+source.getUserData());
5}