Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

External Font usage

Phil Pe
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);
Thnak you very much for you help!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic