I have a JTable that a user can input data. I have an image that I would want to put at the top of my page when printed and also another image that I would want to work as footer. How do I print these on the same page including data from for a jtable(my images to works as logo and footer are not part of the table; i would take them from my directories)...I mean make it as shown in the image below. I would appreciate any links and ideas.

Recommended Answers

All 5 Replies

I am no expert or even being close to one in GUI design but what I would do quickly on that set up is make a jframe, you could probably use jlabels and set their background to those pictures and then a gridview with textfields in it where you can append your data to.
Guess James will confirm whether this is actually used like that in a working environment with real life applications

Did someone speak my Name?
Yes, except a JTable in the middle, not a hand made grid.
I don't know if you can do that with the print methods in JTable. I suspect you will have to use the normal printer support and draw your header &footer as part of the page. There is header and footer support that does text with page numbers etc, but I don't know if that includes in ages. (Maybe it does via HTML?)

Hi James,
It is possible but I cannot figure out how to 'join the classes'.
You may need to check this links here:
On the second link, I am trying to figure out how can I join my classes with the fancyprintingClass.

first link
Second link

It's not something that I've ever done, so I can't really help. Sorry. J

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.