Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing tools

 
Elizabeth Luckose
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to print tables which has very large number of columns and rows.
That is, the columns as well as the rows do not fit into a single page.
Is this possible? If so,it would be much appreciated if you give the code.
I want to print each and every cell's value separately
using "Graphics2D.drawString(table.getValueAt(row,col)),
without printing the table's image as such using table.paint(Graphics2D).
Is there any free tools available for printing tables? Can I use
JReport or Elixir, so that I will pass the table reference (or table data)
to these tools and get it printed with some headers.
Please help
Thanks,
Elizabeth
 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)
PrinterJob prnJob;
prnJob.printDialog();
will display printdialog where you may choose printing properties (orientation, number of copies). It depends on OS, installed in OS printer driver, your printer/plotter and the size of the paper your printer works with
Usually printers or drivers permit configuration of headers, pages, footnotes, etc., etc.
2)
Why don't you export/write table data to file, import it to MS Excel (or any table editor) and format there?
Generally speaking, I just do not get the problem. Please explain
[This message has been edited by G Vanin (edited November 22, 2001).]
 
Elizabeth Luckose
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the no. of columns in a table is large, it wont fit in a single page even if it is in landscape orientation. I want all the columns printed. There may also rows which spans over multiple pages.
Is there any tools available for printing tables.
Thanks
Elizabeth

Originally posted by G Vanin:
1)
PrinterJob prnJob;
prnJob.printDialog();
will display printdialog where you may choose printing properties (orientation, number of copies). It depends on OS, installed in OS printer driver, your printer/plotter and the size of the paper your printer works with
Usually printers or drivers permit configuration of headers, pages, footnotes, etc., etc.
2)
Why don't you export/write table data to file, import it to MS Excel (or any table editor) and format there?
Generally speaking, I just do not get the problem. Please explain
[This message has been edited by G Vanin (edited November 22, 2001).]

 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Elizabeth,
can you give me any idea how do you want it to be distributed over pages?
 
Elizabeth Luckose
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
The columns which are not printed in the first page should be printed in the next page
Thanks,
Elizabeth
Originally posted by G Vanin:
Elizabeth,
can you give me any idea how do you want it to be distributed over pages?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic