Ok so I'm writing a program that outputs text to a file.

Currently, I am writing it to a .TXT file for ease and convenience. Ideally, I would like to output some of the information so that it is formatted with Italics. I'm thinking that using a RTF file would be simplest but i'm not entirely sure as I have never bothered with this problem.

Any help of guidance would be appriciated. Also if suggesting a file type, do you know of any useful Websites that have tutorials or guides to outputting formatted text using java.

Thank you in advance

well, you could write to several types of files. you can go for rtf, then this might be a good starting point.
you could also store your layout information in a xml file, and use that template to generate a pdf file, containing the text you want, in the layout you want. XSL Formatting can do that for you.

Currently, I am writing it to a .TXT file for ease and convenience. Ideally, I would like to output some of the information so that it is formatted with Italics. I'm thinking that using a RTF file would be simplest but i'm not entirely sure as I have never bothered with this problem.

There are other simpler/lightweight formats out there. For e.g. Markdown, which this site uses for posting is good format if you have modest formatting requirements (italics, underline, bold). Plus it has the advantage of being a format which can be read/viewed without any special viewer (as opposed to RTF files). And if for some reason the users need to view a visual report, there are loads of Markdown to HTML/PDF/XXX converters out there.

I love James Cherrill's idea of using a html file to output. Then the file could be opened ina browser to display the formatting. Never even thought of that. Thank you!!

This question has already been answered. Start a new discussion instead.