Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    Bookmark Topic Watch Topic
  • New Topic

How to change font and font size

 
Justin Char
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Report post to moderator
// new Font("Serif", Font.PLAIN, 48); doesn't work ..
Program runs fine just want to change Center to different font and font size.
strOut = ("Center (DC), " + SavedTime);
Counter.write(strOut)
Counter.newLine();
Counter.newLine();

Just want to change the font of above text.

Thank You in advance. I have tried to figure this out for a long time.
I can't seem to find the answer. I am using buffered writer to write my adhoc report.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49789
69
  • Mark post as helpful
  • send pies
  • Report post to moderator
Where doesn't new Font work?
Why are you asking substantially the same question on two fora?
Can you change Fonts with a BufferedWriter at all? I don't think you can.
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
Text doesn't have a font, except if you have a context (like a GUI) where you can apply a font to text. If you have an "adhoc report" then you will have to learn how to specify fonts in the content of that report. Read the documentation for whatever interprets the data you send it.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15441
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question in multiple forums.
 
    Bookmark Topic Watch Topic
  • New Topic