• Post Reply Bookmark Topic Watch Topic
  • New Topic

External Font usage  RSS feed

 
Phil Pe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm trying to have my title in an applet to be in a specified font (in this case Pokemon.ttf - TrueType font), but the following lines just makes the title in a standard font, can anyone tell me what I'm doing wrong? (the font file .ttf is in the same directory as the .java program. I also tried putting the font in lib/fonts in java compiler directory but no results)
JLabel label = new JLabel("Title");
Font myTitleFont = new Font("Pokemon", Font.BOLD | Font.ITALIC, 32);
label.setFont(myTitleFont);
Thnak you very much for you help!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!