现在看来我很累很傻:)我想在满足某些条件时触发按钮按下事件。这是我的代码:
@FXML protected void play(ActionEvent event) throws Exception {
if(menu.getText().equals("The certain text")) {
play.fireEvent(event); //Trying to cancel event
}
}
当我按下带有 fx:id "play" 的按钮时,应用程序挂起。我究竟做错了什么?非常感谢!