【发布时间】:2014-07-18 08:16:40
【问题描述】:
我需要一个 .fxml 文件来构建我的 GUI。我实际上需要让它在没有鼠标的情况下工作,只需键盘操作.... 所以,这里是 fxml 中的按钮:
<HBox spacing="10" alignment="bottom_right"
GridPane.columnIndex="1" GridPane.rowIndex="4">
<Button text="Login"
onAction="#handleSubmitButtonAction"/>
</HBox>
首先,当按下回车键时,我只需要这个按钮来执行“handleSubmitButtonAction”事件。 (如果您对次要目标有任何提示:让箭头键在按钮中导航,而不是开火;))
【问题讨论】:
标签: button user-interface javafx fxml enter