• Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing Question  RSS feed

 
Jesse Walker
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to make Java print the contents of a JFrame to the default printer, which class hanles that if their is?

Also, I know of the frame.dispose() method but that doesn't seem to close a JFrame, I have a multiple JFrame application with a back button option, I would like to find the best way to close the current frame, I am usinge JFrame.dispose?
Thanks,
Jesse
 
Joe Ess
Bartender
Posts: 9426
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at The Java Tutorial: Printing.
Also, if you look at the Java API for Window, you'll see that dispose() doesn't do what you think it does. You first want to call setVisible()
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!