It's hard to know if a point is in a rectangle if you don't know where the rectangle is.
How do you show the image that you can't get its position?
Type: Posts; User: Norm
It's hard to know if a point is in a rectangle if you don't know where the rectangle is.
How do you show the image that you can't get its position?
Please explain. Add some printlns to your code to show the mouse's location and the rectangle's location.
Then click on different parts of the rectangle and see what x,y is printed out for that...
Get the cursor's/mouse's x,y position and see if it is in the rectangle where the image is.