Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javafx #button #id
ADD COMMENT
Topic
Name
5+2 =