gpt4 book ai didi

java - 创建仅向导的 JFace 应用程序

转载 作者:行者123 更新时间:2023-12-02 08:03:49 24 4
gpt4 key购买 nike

我正在开发一个使用 JFace 向导作为唯一 GUI 的应用程序,我有点不确定自己是否走在正确的轨道上。

基本上我是这样启动 GUI 的:

Display.getDefault(); // Creates a Dialog (program crashes with a NullPointerException if this is skipped)
Wizard wizard = new SnapWizard();
WizardDialog dialog = new WizardDialog(null, wizard); // No Shell needed?
dialog.create();
dialog.open();

这似乎让一切都运行起来,但这是“正确”的做法吗?我不需要 SWT Shell 吗?

我依稀记得之前使用SWT时使用循环进行渲染,这是Jface自动处理的吗?

最佳答案

如果未提供,将创建Shell。事件循环在 dialog.open(); 中运行。

您可以查看JFace Wizard snippet .

关于java - 创建仅向导的 JFace 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8482550/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com