Taking screenshot in Java (Robot, code working but not with external full screen application)
I am using the following code for taking a screenshot: Robot robot = new Robot(); BufferedImage image = robot.createScreenCapture(screenRectangle); ImageIO.write(image,"png", file); This code is running good. It takes screen shots of my desktop when I run the program, etc. However, when I try to run first some game, application in full screen , it doesn't work properly. It renders either black screen, either the same "initial" picture. Is this problem known, and how to fix this please? Second question : Is this possible to simulate some "Print Screen" key we can have on keybord in order to