This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to implement Print Screen in Swing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to implement Print Screen in Swing?" Watch "How to implement Print Screen in Swing?" New topic
Author

How to implement Print Screen in Swing?

Cheung Chau
Greenhorn

Joined: May 25, 2009
Posts: 15
I would like to implement an option in menu that allow me to print a screen shot of my application. Thank you
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19684
    
  20

Check out java.awt.Robot.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Cheung Chau
Greenhorn

Joined: May 25, 2009
Posts: 15
Hi Rob,

Thank you for your reply. I wonder if this is the only way? I mean using the Robot class createScreenCapture method with Toolkit.getDefaultToolkit
().getScreenSize(). I am just wondering. Anyway, thank you for your comment or I wouldn't even get to know the Robot class can capture screen shot.

-Cheung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to implement Print Screen in Swing?