Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Font type supported by java  RSS feed

 
Sonara Rahul
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello sir,
The font for JLabel is given by html tag

But java doesn't support arial. I need arial font type with font size as 14.Can u pl.. specify the font size in html which is equivalent to font size of 14 in java.
How do i give arial type for all labels in java.
Expecting u'r suggestions,
With regards,
Sonara.
[This message has been edited by Sonara Rahul (edited October 04, 2001).]
[This message has been edited by Sonara Rahul (edited October 04, 2001).]
[This message has been edited by Sonara Rahul (edited October 04, 2001).]
 
Ali Hassaan
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Font []font=GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts ();
Font f1=new Font(font[1].getFontName (),Font.PLAIN ,12 );"
from above code you can have all fonts and you can choose your ones.
and after tht Label.setFont(f1); can set font...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!