Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Applet Font...  RSS feed

 
Jeremy Parsons
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to figure out how to use BOLD and ITALIC for my font, but when I put them seperated by a comma, I get a compile error...

Font hell2Font = new Font("Helvetica", Font.ITALIC, 12);

Is the line I need help with.. Is there a way to combine BOLD and ITALIC?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Font hell2Font = new Font("Helvetica", Font.BOLD|Font.ITALIC, 12);
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!