Passing pointer position to an object in Java.
- by Gabriel A. Zorrilla
I've got a JPanel class called Board with a static subclass, MouseHanlder, which tracks the mouse position along the appropriate listener in Board. My Board class has fields pointerX and pointerY.
How do i pass the e.getX() and e.getY() from the MouseHandler subclass to its super class JPanel? I tried with getters, setters, super, and cant get the data transfer between subclass and parent class. I'm certain it's a concept issue, but im stuck.
Thanks!