Set Size of JFace Wizard

Ohanes Dadian picture Ohanes Dadian · Jul 29, 2010 · Viewed 7.9k times · Source

I am building an Eclipse RCP application and am having trouble on settings the size of a JFace Wizard.

Answer

Dan Gorst picture Dan Gorst · Nov 15, 2011

Yeah, it is generally a good idea to let Eclipse work out the size for you. However, if you really want to set the size of the wizard, you can do it by setting the size of the WizardDialog which you are using to open your wizard. For example:

Wizard wizard = new MyCustomWizard();
WizardDialog wizardDialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
wizardDialog.setPageSize(WIDTH, HEIGHT);
// Could also use wizardDialog.setMinimumPageSize(WIDTH, HEIGHT) if that's more appropriate