I have a TextField and a Label with mnemonicParsing true. I want to set the labelFor property of the label with the id of the TextField. How do I do that in FXML?
<GridPane hgap="5.0" snapToPixel="false" vgap="10.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Label maxWidth="-Infinity" text="_A Label" GridPane.halignment="RIGHT" GridPane.hgrow="NEVER" GridPane.vgrow="NEVER" mnemonicParsing="true" />
<TextField id="myTextField" GridPane.columnIndex="1" GridPane.hgrow="NEVER" />
</children>
</GridPane>
Thanks
id="myTextField"
should befx:id="myTextField"
here – Cavanagh