Okay, so I'm just wondering how to implement a MouseListener on a class that I'm writing. Pretty much, I have some class, say SimpleCanvas, a stripped down version of Canvas.java
This SimpleCanvas has a method called "addMouseListener (MouseListener ml)"
I've told another class which is calling SimpleCanvas to implement MouseListener; my question is:
How do the MouseEvents work? If SimpleCanvas is defined in a Cartesian-like co-ordinate system, and I want the MouseClicked (MouseEvent e) to work by checking where the mouse was clicked, relative to SimpleCanvas' co-ordinate system, how would I do so? e.getX() and e.getY()? Or something else?
Sorry if this sounds kinda stupid. I suck at programming.
Cheers
~read~