Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to print inside Swing

 
Kapil Keskar
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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.
http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-Printing.html
cheers,
Ben.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic