Hi, I'm trying to figure out the MouseListener, but I'm lost. I have a grid that when I click on it I need to get the x and y coordinates. Any help would be appreciated. I'm new at Java and I can't figure out what class to extend and all that fun stuff. Thanks!
I recommend you to chek the MouseAdapter class, you can extend it and override the method of your interest. You can get the x, y coordinates from the MouseEvent and then do something in your code.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.