• Post Reply Bookmark Topic Watch Topic
  • New Topic

can i print whats painted on a panel?  RSS feed

 
Rich Stepanski
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I draw things to a JPanel... lines,text, etc using the Graphics object, is there anyway to print it? ( i mean print it on paper out of a printer)

example: I have X lines of data. I want to print my data in boxes with lines around them. So I draw the text onto a JPanel with boxes and lines around it. Can I print the graphics on the surface?

Thanks.
 
Pritam Barhate
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Of course you can print it on paper using Java 2D Printing API.

Enter "Java 2D Printing API tutorial" in google you will get thousands of (56000, to be exact) links.

The offcial sun tutorial is located here
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!