I want to print the JPanel on a JFrame on along with one table . Below is the snapshot of that Frame.
Please help me out... please provide the steps. The contents are available on the web is not sufficient for printing components like JTable. I am a newbie so please provide help considering my level of experience and knowledge. I don even need ready made code... just a proper working lead.
java.awt.print.Printable's print method provides a Graphics object that can be used in java.awt.Component's print method. The only thing that then needs to be done is printing multiple pages.
I still think that JTable's print method, in combination with a MessageFormat for the header, should be enough.
Joined: Jun 09, 2003
> I still think that JTable's print method, in combination with a MessageFormat for the header, should be enough.
Interesting, thanks, I must try it (never had a need for it, but would be nice to get it to work)
Joined: Jun 18, 2010
Thanks for the response, I have tried with jtable's print method. I t works fine for printing Jtable only. But I have to print a invoice formatted on a JPanel, so there will be other lots of other JtextComponents, along with Table and images.just like the attached image.
I have planned to preview the format in a Jframe on a JPanel then on button click of that Frame the Jpanel will be sent to the printer.
please help me with this.I have a deadline to meet. Any help will be gladly appreciated.