Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Applet default font

 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I get the default font & size that is being used by my applet across various platforms and browsers?
I don't really care which font it's using as default, I just need to make a line bold using the same font & size so that it looks consistant.
BTW, this is an AWT applet.
Thanks!
Drew
 
Peter Gragert
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use something like this:
Font myHelvetica = new Font( "Serif" , Font.BOLD , 14);
roundedTaylor.setFont( myHelvetica ); // an object with a setFont method.
It means: look at the Font Api !!!
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!