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
if(dialogArea != null)
		getShell().layout(true);
	
}
/**
 * Set the message text. If the message line currently displays an error,
 * the message is saved and will be redisplayed when the error message is set
 * to <code>null</code>.
 * <p>
 * Shortcut for <code>setMessage(newMessage, IMessageProvider.NONE)</code>
 * </p> 
 * 
 * @param newMessage the message, or <code>null</code> to clear
 *   the message
 */
public void setMessage(String newMessage) {
	setMessage(newMessage, IMessageProvider.NONE);
}
/**
 * Sets the message for this dialog with an indication of what type
 * of message it is.
 * <p>
 * The valid message types are one of <code>NONE</code>, 
 * <code>INFORMATION</code>, <code>WARNING</code>, or <code>ERROR</code>.
 * </p>
 * <p>
 * Note that for backward compatibility, a message of type <code>ERROR</code> 
 * is different than an error message (set using <code>setErrorMessage</code>).