简体   繁体   中英

Creating a wizard only JFace application

I'm working on an application that uses a JFace Wizard as its only GUI and I'm a bit unsure as to whether I'm on the right track.

Basically I initiate the GUI like this:

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();

This seems to get everything running, but is it the "right" way of doing it? Don't I need an SWT Shell ?

I vaguely remember using a loop for rendering when I used SWT earlier, is this handled automatically by Jface?

A Shell will be created if not provided. Event loop is run in dialog.open(); .

You can check out JFace Wizard snippet .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM