Link to home
Start Free TrialLog in
Avatar of zhtet
zhtet

asked on

Java Swing pass events to child of another Parent

Hi,
I am not sure if this has been brought up before, unless I happened to miss it when browsing. Problem is: I have a JFrame (the main frame), which has 2 JPanels a and b. Within JPanel a, I have several more JPanel's (BufferedImage holders) which has individual attached mouseEvents. When any of these mouseEvents are triggered, this information has to be passed to the JFrame (the mouseEvent handler's parent's parent), which will then trigger an animation sequence in JPanel b.
I've tried various means, including static variables, etc. but I can't seem to trigger the JFrame to init the other JPanel.
Any help would be appreciated.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zhtet
zhtet

ASKER

DOH!! guess i really need to hit the sack soon :) ...
Many Thanks for the quick response. Solution accepted.
:-)