Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Donna Thompson   on Apr 06 In Java Category.

  
Question Answered By: Evelyn Hughes   on Apr 06

You want to make a bitmap of screen ?

if yes, then try this code.
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension screenSize = toolkit.getScreenSize();
Rectangle screenRect = new Rectangle(screenSize);
// create screen shot
Robot robot = new Robot();
BufferedImage image  = robot.createScreenCapture
(screenRect);
// save captured image to PNG file
String imageFileName = File.separatorChar
+ "Automation" + File.separatorChar + outFileName ;
ImageIO.write(image, "png", new File(imageFileName));
// give feedback

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on System Clipboard Or get search suggestion and latest updates.


Tagged: