Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing html from an applet

Jeff Wisard
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I have an applet that displays JTables with data within them. I would like to be able to print the data in a nice looking formatted way (essentially make a printable report of the data displayed). One idea I have is to make a call to the web server and have it generate an html version of the data (it has access to the data also) and return that to the applet as a string. I then would like to print the HTML version as it should look via a browser...without actually displaying it. My guess is that this is easier than printing the table itself (including header graphics and descriptions, etc.).
However, I have never used the printing API (2D)and don't know where to get started. Can someone help me out with this? Code examples would be greatly appreciated.
(BTW: The applet is signed, so there are no problems accessing printers or other system resources)
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic