Bug 40638 [Dialogs] TitleAreaDialog is not initialized in the usual way.
When the TitleAreaDialog is constructed, it isn't ready to handle all of its mutators. In this snippet, the create() line is required, because otherwise setMessage() will throw a NullPointer when it attempts to modify the messageLabel; but it shouldn't be (according to Eclipse conventions). TitleAreaDialog titleAreaDialog = new TitleAreaDialog(getShell()); titleAreaDialog.create(); titleAreaDialog.setTitle("Title: org.eclipse.jface.dialogs.TitleAreaDialog"); titleAreaDialog.setMessage("Message: org.eclipse.jface.dialogs.TitleAreaDialog"); titleAreaDialog.open();
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/TitleAreaDialog.java
fillerData.left = new FormAttachment(0,horizontalSpacing);
	fillerData.top = new FormAttachment(messageImageLabel,0);
	fillerData.bottom = new FormAttachment(messageLabel,0,SWT.BOTTOM);
	bottomFillerLabel.setLayoutData(fillerData);	
	
	FormData data = new FormData();
	data.top = new FormAttachment(messageImageLabel, 0,SWT.TOP);
	data.left = new FormAttachment(0, 0);
	data.bottom = new FormAttachment(messageImageLabel, 0, SWT.BOTTOM);
	data.right = new FormAttachment(messageImageLabel, 0);
	leftFillerLabel.setLayoutData(data);
}
/**
 * The <code>TitleAreaDialog</code> implementation of this 
 * <code>Window</code> methods returns an initial size which
 * is at least some reasonable minimum.
 *
 * @return the initial size of the dialog
 */
protected Point getInitialSize() {
	Point shellSize = super.getInitialSize();
	return new Point(
		Math.max(convertHorizontalDLUsToPixels(MIN_DIALOG_WIDTH), shellSize.x),
		Math.max(convertVerticalDLUsToPixels(MIN_DIALOG_HEIGHT), shellSize.y));
}
/**
 * Retained for backward compatibility.
 * 
 * Returns the title area composite. There is no composite in this
 * implementation so the shell is returned.