This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to change font and font size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

How to change font and font size

Justin Char
Ranch Hand

Joined: Mar 05, 2007
Posts: 76
// 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

Joined: Oct 13, 2005
Posts: 38045
    
  22
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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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

Joined: Aug 16, 2005
Posts: 14074
    
  16

Please do not post the same question in multiple forums.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to change font and font size
 
Similar Threads
Help! Need to write out a amount after string has certain values in it. Must add and read file.
change the button font
How to change font properties, of subsection of page.
Trying to change font on a using bufferedwriter
????????????plz tell me how to adjust the letters style?