首页 > 编程 > Java > 正文

javafx argument type mismatch 异常

2019-11-08 18:22:42
字体:
来源:转载
供稿:网友
第一次Scene Builder  出现的这个问题

错误代码:

<children>        <Button fx:id="myButton" layoutX="60.0" layoutY="73.0" mnemonicParsing="false" onMouseClicked="#showDateTime"  PRefHeight="23.0" prefWidth="120.0" text="Show Date Time" />        <TextField fx:id="myTextField" layoutX="60.0" layoutY="155.0" />    </children>

修改里面的onMouseClicked="#showDateTime"  为:onAction="#showDateTime"

就可以解决这个问题


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表