• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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!
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using a font depends on the OS u are using> In windows u need to install the font from the control panel. then u should not have problems in accessing that font.
 
Phil Pe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot, it worked great! I din't think of that at all
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!