Deepak
Deepak

Reputation: 6812

Text alignment in java printing

I am using 2d graphics to print the string on to the paper. I want the string to be aligned on the paper like right, left, centre. How can I do that ?

Upvotes: 1

Views: 1997

Answers (2)

trashgod
trashgod

Reputation: 205885

After reviewing the tutorial, as @mKorbel suggests, you might look at this example that prints the date in the bottom right corner of each page.

Upvotes: 2

mKorbel
mKorbel

Reputation: 109823

basic Printing tutorial

EDIT: basic 2D Graphics stuff shows examples about PrinterJob, PrintJob and Print

Upvotes: 3

Related Questions