package lu.tudor.santec.gecamed.core.utils;

import java.awt.Font;
import java.awt.font.TextAttribute;
import java.util.Map;

import javax.swing.JLabel;

public class ComponentUtilities
{
	@SuppressWarnings("unchecked")
	public static void setFont (JLabel label, String fontName)
	{
		Map<TextAttribute, Object>	attributes;
		Font	font;
		
		
		font	= label.getFont();
		attributes	= (Map<TextAttribute, Object>) font.getAttributes();
		attributes.put(TextAttribute.FONT, fontName);
		label.setFont(new Font(attributes));
	}
}
