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
int horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
	parent.setBackground(background);
	
	
	titleImage = new Label(parent, SWT.CENTER);
	titleImage.setBackground(background);
	titleImage.setImage(JFaceResources.getImage(DLG_IMG_TITLE_BANNER));
	
	FormData imageData = new FormData();
	imageData.top = new FormAttachment(0,verticalSpacing);
	imageData.right = new FormAttachment(100,-1 * horizontalSpacing);
	titleImage.setLayoutData(imageData);
	
	
	titleLabel = new Label(parent, SWT.LEFT);
	JFaceColors.setColors(titleLabel,foreground,background);
	titleLabel.setFont(JFaceResources.getBannerFont());
	titleLabel.setText(" ");
	FormData titleData = new FormData();
	titleData.top = new FormAttachment(0,verticalSpacing);
	titleData.right = new FormAttachment(titleImage);
	titleData.left = new FormAttachment(0,horizontalSpacing);
	titleLabel.setLayoutData(titleData);
	
	
	messageImageLabel = new Label(parent, SWT.CENTER);
	messageImageLabel.setBackground(background);
	
	messageLabel = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
	JFaceColors.setColors(messageLabel,foreground,background);