• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to implement Print Screen in Swing?

 
Cheung Chau
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20514
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out java.awt.Robot.
 
Cheung Chau
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic