wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Printing Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Printing Question" Watch "Printing Question" New topic
Author

Printing Question

Jesse Walker
Ranch Hand

Joined: Aug 18, 2004
Posts: 50
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

Joined: Oct 29, 2001
Posts: 8836
    
    7

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()


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Printing Question
 
Similar Threads
mouse clicks
JFrame ?!!!
closing jframe with button question.
Minimize button in JFrame
NetBeans IDE 5.5