Point e = MouseInfo.getPointerInfo().getLocation();
Explanation:
Through the above we can find the point where the mouse is located. And you can check the further code, the details are given how this point is being used to find the x and y value of the location. You are also going to find that we can do almost anything at this location. Remember this code is in JAVA,