FontName as a Variable not working in AWT JAVA

enter image description here

I was trying to get fontname in a string variable and trying to make it more dynamic and then passing that string variable as a parameter while creating Font object it only makes the font bold not changes it font family ?why??