I'm new to JavaFX, have a quick look at it, I wonder if we can run java code inside FXML markup file? Like we can do it with jsp file with block ?
-
I assume you mean "FXML"?James_D– James_D2015-02-23 19:14:45 +00:00Commented Feb 23, 2015 at 19:14
-
yes , sorry i was not clear enoughTLD– TLD2015-02-23 19:15:46 +00:00Commented Feb 23, 2015 at 19:15
-
Could you edit the question and fix that? It will make it easier for others to find if they have the same question.James_D– James_D2015-02-23 20:18:54 +00:00Commented Feb 23, 2015 at 20:18
-
yes i will fix it, thank you for your commentTLD– TLD2015-02-23 21:19:35 +00:00Commented Feb 23, 2015 at 21:19
Add a comment
|
1 Answer
No. FXML is just markup that defines the layout. You can express bindings in FXML, and technically you can include Javascript for event handling, though I don't think anyone uses that for any real applications.
The dynamic aspects of the application are typically managed in a controller, which is a Java class. The FXML file can inject elements into the controller and nominate controller methods to be used as event handlers.
See the introduction to FMXL for details.