• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

External Font usage  RSS feed

 
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!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!