Background PrintScreen in Java

1

I want to know if I can get print from a program running in the background I currently use the command:

try {
Robot robot = new Robot();
BufferedImage bi=robot.createScreenCapture(new Rectangle(valor3,valor4,189,24));
ImageIO.write(bi, "jpg", new File("C:\OCR\test.jpg"));
}

It works from good with program running in the foreground, but wanted it to take a picture of a program that was running in the background, with this command it takes a photo of what is on the screen always ... Someone gives a light ai pf!

    
asked by anonymous 16.05.2017 / 19:37

0 answers