To capture screen shot in my java application i have write following code
Rectangle screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
BufferedImage capture = new Robot().createScreenCapture(screenRect);
ImageIO.write(capture, "png", new File("resources/img/screenshot.png"));
This is working successfully and capture screen shot but this is not working in windows 8 operating system. any one else who have face this type of problem and get soluction?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…