Jump to content

Canvas Help


Recommended Posts

Posted (edited)
bot.getCanvas().getBounds();
only returns the rectnagle of the canvas position within the client, so it returns

0,0,width,height.

So when using robot to take a screenshot it does it from the 0,0 of your screen.

 

 

You want getLocationOnScreen(). getBounds() returns the locatiom of the component relative to it's container, not your screen

Edited by fixthissite
  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...