swing - How to set Font from String in Java -
i have cms application written using c#, , should save font's varchar in database. should specified font java application.
so how possible set font jlabel
or font
object using string
.
for example, have string contains font type, size , name:
type:bold size:12 name:microsoft sans serif
so how should convert typed string font
in java?
jlabel.setfont(font.decode("fontname-style-pointsize"))
http://download.oracle.com/javase/1.5.0/docs/api/java/awt/font.html#decode%28java.lang.string%29
Comments
Post a Comment