need to embed child fxml inside parent fxml

2019-06-28 08:27发布

问题:

I am new to JavaFX and I want to know if there is way to place one fxml file as in child.fxml inside another say parent.fxml.

Why do i need this ? Idea is, i want create independent screens(small one) and write a parent fxml where we can add these child fxml to create a desired GUI, instead of one fxml where i dump all the controls.

If it's possible, please help with some dummy code or links. I have tried looking around for a while but did not get anything useful.

Thanks in advance for any help.

回答1:

If I understand correctly you want to use "fx:include" tag. Please refer the fxml reference



标签: javafx-2