File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing JTable

 
satya sahu
Ranch Hand
Posts: 97
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Can somebody tell me how to print the contents of a JTable. My requirement is i have a JTable with some data. The entire table along with its header, should be printed.
Please give me some sample code.
Thanks in advance.
 
Lionel Badiou
Ranch Hand
Posts: 140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Satya,

Here's a (q&d) sample. I think you may adjust it to your needs.



You may found useful to look at some reporting tools too (like JasperReports).

Hope that helps,
 
sasi kala
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Lionel Badiou,

i am also having the same problem. my requirement is to print a html
page which is placed in JEditorPane. By using ur example program i am able
to print my html page.

thank you very much.

but i am unable to specify the number of pages to print.

i have one question regarding this How to count the number of lines in
JEditorPane?
so that i can specify the number of pages to be printed.

Thanks in Advance.

[ April 21, 2005: Message edited by: sasi kala ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic