Remove Thread.sleep from how to make a screenshot example

This commit is contained in:
Marek Lewandowski 2016-10-28 18:26:53 +02:00
parent f4d6384654
commit fe0d1c0b4a
1 changed files with 0 additions and 1 deletions

View File

@ -14,7 +14,6 @@ public class Screenshot {
}
public void getScreenshot(int timeToWait) throws Exception {
Thread.sleep(timeToWait);
Rectangle rectangle = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
Robot robot = new Robot();
BufferedImage img = robot.createScreenCapture(rectangle);