File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes How to print inside Swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to print inside Swing" Watch "How to print inside Swing" New topic

How to print inside Swing

Kapil Keskar
Ranch Hand

Joined: Dec 04, 2001
Posts: 47
I have got problem of swing in which i have to print whatever is inside the JInternalFrame.
How to use print in swing, does any one know?
Michael Szul
Ranch Hand

Joined: Sep 18, 2001
Posts: 57
AWT comes with a print facility and many of the new printing features are covered under the Java 2D API in the JFC. CORE JFC by Kim Topley is a good start. He offers several examples of using print functions with actual Swing applications.
Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
I found this link useful. You can download some code which handles printing, all you have to do is send it the name of the component you're trying to print and it does it.

SCJP 1.4,
I agree. Here's the link:
subject: How to print inside Swing
jQuery in Action, 3rd edition