• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Printing JTable

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic