【发布时间】:2014-10-31 12:16:02
【问题描述】:
我正在使用 javafx,想在按钮的“setOnAction”中编写代码来关闭 javafx1 类并运行 javafx2 类,但我看到了错误“应用程序启动不能被多次调用”。我该如何解决这个问题?
//This code is in the class JavaFX1:
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
JavaFX2.main(null); //How can i change current line?
stage.close();
}
});
【问题讨论】:
标签: javafx launch application-error