javafx - SceneBuilder - Sense of on action -


i started working javafx , scenebuilder 5 days ago. have 1 question. under label "code" have fx:id (am right, method-name) , field on-action. what's sense of on-action-field?

thanks :-)

best regards,

michael

the on action field name of event listener method actionable components. example, add button , add name buttononaction field on action. go menu view -> show sample controller skeleton. should see snippet:

@fxml void buttononaction(actionevent event) { } 

this method must mentioned name in fxml file of course, should have entry this:

<button onaction="#buttononaction" text="button" /> 

therefore, clicking button fires method bottononaction.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -