I am a little new at this and still learning, so keep it as informative as possible please (include imports, etc).

I have a public class

public class BoldMyString {
protected String getLetterBody() {
return "This string is not bold. This string is bold.\r\rNow this string is not bold.";

}

How do I get "This string is bold" to show up in bold lettering??

Thanks All.

02-01-2008, 07:11 PM

tim

Displaying

Hello TampaTechGuy

If you want to display text with bold styling, then you must use a graphical user interface or GUI. I don't think that console programs where designed for formatting the style of text. (example: Windows Command Prompt)

02-01-2008, 07:24 PM

TampaTechGuy

Its part of a web application I'm working on --

There are pieces of it that use:

new Font(Font.TIMES_ROMAN, 8, Font.ITALIC)));

but I am stuck on how to apply this to my code in a different class.

*but bold, not italic of course.

02-03-2008, 10:54 AM

tim

Graphics

Hello TampaTechGuy

I would use the Graphics class to draw text. Then you can add any formatting that you can think of! See the last picture in this thread. I formated the text and added some layout so that it is displayed around images. You can do this if you like, but Swing or AWT components will offer a faster solution. :D