[BUGFIX] Removed JFrame from screenshot

This commit is contained in:
Emma Stone
2017-05-16 17:56:32 +01:00
committed by GitHub
parent 1337708a26
commit bb711f4064
+2 -2
View File
@@ -160,7 +160,7 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
case "Create screenshot":
try {
Robot robot = new Robot();
Rectangle parabotScreen = new Rectangle((int) getLocation().getX(), (int) getLocation().getY(), getWidth(), getHeight());
Rectangle parabotScreen = new Rectangle((int) getLocation().getX(), (int) getLocation().getY() + (menuBar.getHeight() + features.getHeight()), getWidth(), getHeight());
BufferedImage image = robot.createScreenCapture(parabotScreen);
String randString = StringUtils.randomString(10);
boolean search = true;
@@ -363,4 +363,4 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
public JMenuItem getNotifications() {
return notifications;
}
}
}