aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to print contents of JTable !!!Very urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to print contents of JTable !!!Very urgent" Watch "How to print contents of JTable !!!Very urgent" New topic
Author

How to print contents of JTable !!!Very urgent

Md.Afzalur Rashid
Ranch Hand

Joined: Oct 29, 2002
Posts: 47
How to print contents of JTable with customized header and footer on the page.

I am strugling to print the report usin java swing. I have generated report and kept the results in a JTable, now i want to print the contents with the company information on top of the page and signature at the end of the records. Can anyone help me on this regards...Thanks


Be Confident,be trusty,Count your age by friends not by years
Md.Afzalur Rashid
Ranch Hand

Joined: Oct 29, 2002
Posts: 47
I also want to print image beside the table
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
http://forum.java.sun.com/thread.jspa?threadID=5122492

can't recall if I've printed a JTable using the code from the above, but
every component I have tried has printed OK.
Md.Afzalur Rashid
Ranch Hand

Joined: Oct 29, 2002
Posts: 47
Thanks Michael Dunn
Can you explain me how to compile StandardPrint.java and use?

Afzal
Tapan Maru
Ranch Hand

Joined: May 08, 2006
Posts: 65
From JDK 5, print method is included which is overloaded also.

you can give message format as the parameter.

go through API and try out. If you are unable to solve than let me know, i will send you a demo program for that.

Best Of Luck


Tapan Maru
tapanmaru@gmail.com
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
I'm actually using an older version of StandardPrint, the link is supposed to
be the latest improved version.

to get the version in the link to compile:
comment out the package
comment out the 3 x import tjacobs.ui.....
add this at the bottom of the code

it should compile OK now, and if its use is the same as the version I'm using,
you call it like this
Md.Afzalur Rashid
Ranch Hand

Joined: Oct 29, 2002
Posts: 47
Thanks Tapan Maru
Please send me the demo....
Tapan Maru
Ranch Hand

Joined: May 08, 2006
Posts: 65
Please click the link follow: you will get a demo code for printing JTable.
but for that you have to install JDK1.5.0 or higher on your system
Sorry I am sending the link but i think i lost the demo code..
Best Of Luck

http://java.sun.com/developer/JDCTechTips/2005/tt0308.html#1
Md.Afzalur Rashid
Ranch Hand

Joined: Oct 29, 2002
Posts: 47
Thanks mr. Tapan Manu
Md.Afzalur Rashid
Ranch Hand

Joined: Oct 29, 2002
Posts: 47
Still I am strugling with the logic
Md.Afzalur Rashid
Ranch Hand

Joined: Oct 29, 2002
Posts: 47
How can i setup the page
Md.Afzalur Rashid
Ranch Hand

Joined: Oct 29, 2002
Posts: 47
Need to develop a generic reporting tool...can any one help me to list out some of the simillar tools with lik?
Md.Afzalur Rashid
Ranch Hand

Joined: Oct 29, 2002
Posts: 47
Started developing beeter ideas...hope i can share next week...
Md.Afzalur Rashid
Ranch Hand

Joined: Oct 29, 2002
Posts: 47
I it possible to place a table inside text area?
Tapan Maru
Ranch Hand

Joined: May 08, 2006
Posts: 65
you want to use a reporting tool? i have used iText API, which is an open-source tool for creating PDF reports. Sorry for late reply
Md.Afzalur Rashid
Ranch Hand

Joined: Oct 29, 2002
Posts: 47
Dear Mr. Tapan Maru
Thanks for you kind information. Keep in touch
Afzalur Rashid
afzal_01@yahoo.com
 
 
subject: How to print contents of JTable !!!Very urgent