Answers for "javafx get button id"

0

javafx get button id

// that goes to the place where you create your buttons
buttonDone.setId("done");

...

// that goes inside the callback method
String id = ((Node) event.getSource()).getId()

switch(id) {
    case "done":
        // your code for "buttonDone"
        break;
}
Posted by: Guest on March-18-2022

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language