我想将内部类“ FinishDialogController”控制器绑定到FXML。 这是一个真正的难题。
但是fx:controller="app.view.MainlayoutController.FinishDialogController"
是错误的。
谁知道正确的方法?
我在Introduction to FXML中搜索“内部”,但未找到。
这是完整的FXML:
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane prefHeight="108.0" prefWidth="350.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="app.view.MainlayoutController.FinishDialogController">
<children>
<TextField fx:id="textField" layoutX="25.0" layoutY="50.0" onaction="#handleTextField" prefHeight="23.0" prefWidth="314.0" AnchorPane.leftAnchor="25.0" AnchorPane.rightAnchor="25.0" />
<Button fx:id="okButton" layoutX="219.0" layoutY="78.0" mnemonicParsing="false" onaction="#handleOkButton" text="OK" />
<Button fx:id="deleteButton" layoutX="271.0" layoutY="78.0" mnemonicParsing="false" onaction="#handleDeleteButton" text="Delete" />
</children>
</AnchorPane>