dcsimg
How to Print a JPanel contains two Jpanels and a JScrollPane
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rony_Zacharia
Posted On:   Monday, May 26, 2003 12:14 AM

Hi there,
I have a JPanel (Border Layout) containing a JScrollPane which contain a graph and two other JPanels, one for Graph Scale and other for Graph legend.
If I gave The main JPanel to print, it is printing other panels and the visible part of the JScrollPane only.
If I gave the JScrollPane alone to print I am getting the full content of the ScrollPane.
How could I make the child panels as well as the full content of the ScrollPane got Printed?
Anybody have any idea?

Re: How to Print a JPanel contains two Jpanels and a JScrollPane

Posted By:   Christopher_Schultz  
Posted On:   Monday, May 26, 2003 09:51 AM

Are you talking about hard-copy printing?



If so, printing GUI elements is always a mess. You're better off drawing to an offscreen buffer and using that Graphics object to print to the printer.



-chris
About | Sitemap | Contact