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
* Sets the title image to be shown in the title area of this dialog.
 *
 * @param newTitle the title image show 
 */
public void setTitleImage(Image newTitleImage) {
	titleImage.setImage(newTitleImage);
	titleImage.setVisible(newTitleImage != null);
	if(newTitleImage != null){
		determineTitleImageLargest();
		Control top;
		if(titleImageLargest)
			top = titleImage;
		else
			top = messageLabel;
		resetWorkAreaAttachments(top);
	}
}
/**
 * Make the label used for displaying error images visible
 * depending on boolean.
 */
private void setImageLabelVisible(boolean visible){
	messageImageLabel.setVisible(visible);
	bottomFillerLabel.setVisible(visible);
	leftFillerLabel.setVisible(visible);
	
}
/**
 * Set the message backgrounds to be the error or normal color
 * depending on whether or not showingError is true.