How can I print a text in two columns using Java Swing?
- by Jonas
I have a longer text saved in a String. I would like to print the text in two columns on a single page. How can I do this using Java Swing?
I don't understand how I can wrap the text when it's time to use a new line. I have read Lesson: Printing in the Java tutorial, but I haven't found any useful methods for working with text or Strings except FontMetrics.
Is there any good methods in the Java API for this or is there any good library I can use for this?