I am employing a cropping tool that can draw a rectangle on top of a JLabel containing the image, and its boundaries are to be used to create a sub-image. However, I ran int