This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Printing tools Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Printing tools" Watch "Printing tools" New topic
Author

Printing tools

Elizabeth Luckose
Ranch Hand

Joined: Aug 17, 2001
Posts: 32
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

Joined: Aug 30, 2001
Posts: 898
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

Joined: Aug 17, 2001
Posts: 32
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

Joined: Aug 30, 2001
Posts: 898
Elizabeth,
can you give me any idea how do you want it to be distributed over pages?
Elizabeth Luckose
Ranch Hand

Joined: Aug 17, 2001
Posts: 32
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?

 
 
subject: Printing tools