Font newSampleFont = new Font (shell.getDisplay (), selectionFontData); sampleLabel.setFont (newSampleFont);
void updateSampleFont () {	FontData selectionFontData = getSelectionFontData ();	/*	 * sampleFont may not be the same as the one specified in selectionFontData.	 * This happens when selectionFontData specifies a font alias.	 */	Font newSampleFont = new Font (shell.getDisplay (), selectionFontData);	sampleLabel.setFont (newSampleFont);	if (sampleFont != null) sampleFont.dispose ();	sampleFont = newSampleFont;}