The most intelligent Java IDE
[Logo] JavaRanch » JavaRanch Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » Swing / AWT / SWT / JFace
 
RSS feed
 
New topic
Author

How to implement Print Screen in Swing?

Cheung Chau
Greenhorn

Joined: May 25, 2009
Messages: 13

I would like to implement an option in menu that allow me to print a screen shot of my application. Thank you
Rob Prime
Bartender

Joined: Oct 27, 2005
Messages: 8837

Check out java.awt.Robot.

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

Joined: May 25, 2009
Messages: 13

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
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » Swing / AWT / SWT / JFace
 
RSS feed
 
New topic
hibernate profiler