How can I print a text in two columns using Java Swing? -


I have a longer text in a string. How can I do this?

I do not understand that when it's time to use a new line, how can I wrap the text I have read in the Java tutorial, but I do not want to FontMetrics No useful methods have been found to work with text or string except.

Is there a good way in the Java API or is this a good library that I can use it?

You probably will use Java to set up the print job in the Awt.print.PrinterJob class, And present the graphics on the printer using the java.awt.font.TextLayout () method.

You have to split Java.tt.print.Pause the form that you get from the printer to split the output into two columns.

The whole page is used here.

You must manage to wrap the string automatically. See the print () method in the printed example. You will see that Java classes require you to wrap the text.


Comments