* Create the dialog with {@link CloseAction#HIDE}. This will keep the dialog hidden in order
* to reuse the component. This avoids the time-consuming building of the dialog gui each time.
*/
private void createDialog() {
petForm = new PetForm(FormModelHelper.createFormModel(new Pet()), true);
dialogPage = new FormBackedDialogPage(petForm);
dialog = new TitledPageApplicationDialog(dialogPage, getWindowControl(), CloseAction.HIDE) {
protected void onAboutToShow() {
petForm.requestFocusInWindow();
setEnabled(dialogPage.isPageComplete());