javaFX 2.0 中的 Application.launch() 问题
在我的代码中,我使用 :
Application.launch(MyDesign.getClass(), null);
从单独的类运行 MyDesign 的 UI。 当它调用launch()
时,它会执行MyDesign
类的构造函数。我之前创建了一个 MyDesign
对象并初始化了它的属性。所以我在调用launch()
后得到了一个新对象。 时,我需要停止调用其构造函数
Application.launch().
当我调用您的反馈 。谢谢。
In my code, I have used :
Application.launch(MyDesign.getClass(), null);
to run a UI of MyDesign from a seperate class.
When it calls launch()
, it executes the constructor of MyDesign
class. I have created a MyDesign
object earlier and initialized its attributes. So I got a new object after calling launch()
. I need to stop the calling its constructor when I call
Application.launch().
Your feed back is highly appreciated. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,您无法通过
Application.launch()
直接运行已创建的应用程序。您可以使用下一个存根应用程序并启动它:
Unfortunately you can't directly run already created Application through
Application.launch()
.You can use next stub application and launch it instead: