Passing pointer position to an object in Java.
Posted
by Gabriel A. Zorrilla
on Stack Overflow
See other posts from Stack Overflow
or by Gabriel A. Zorrilla
Published on 2010-03-23T00:45:10Z
Indexed on
2010/03/23
0:51 UTC
Read the original article
Hit count: 377
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!
© Stack Overflow or respective owner