I am using BorderPane
as a root pane of FXML
file. However, the compiler complains that BorderPane
has no controller
property! How to bind a controller class to a FXML
whose root is BorderPane
?
<BorderPane id="rootPane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.saei.explorer.FXMLDocumentController">
I am using BorderPane
because of its capability of stretching the layout on re-sizing the window.
Oops, it turns out that I used
xmlns
property of JavaFX 8 within JavaFX 2.2 environment. I just replaced:with:
and it works now!