当我尝试在xml文档(视图)上放置一个切换按钮时,我在第5行发现错误:类'javafx.scene.control.ToggleGroup'不支持属性'id'
1 <HBox fillHeight="true" >
2 <children>
3 <ToggleButton fx:id="male" mnemonicParsing="false" text="Male">
4 <toggleGroup>
5 <ToggleGroup fx:id="gender" />
6 </toggleGroup>
7 </ToggleButton>
8 <ToggleButton fx:id="female" mnemonicParsing="false"
9 text="Female" toggleGroup="$gender" />
10 </children>
11 </HBox>
感谢您的帮助!