I started playing with JavaFX 2, and I really like the ease of creating a user interface with FXML. However, as soon as you go through the basic examples and need an interface with many windows, it seems illogical to have a definition for the entire user interface of the application in a single FXML file.
Can I write individual components in separate FXML files and then include them as needed? Let's say, for example, that I wanted a window to pop up when a user clicks on an item from the main menu; can I write a definition for this window in a separate FXML file, load it at runtime, and add it to the node tree?
source
share