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
zhtetAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
CEHJConnect With a Mentor Commented:
You just need to add the JFrame as a mouse event listener for the panels' mouse events
0
 
zhtetAuthor Commented:
DOH!! guess i really need to hit the sack soon :) ...
Many Thanks for the quick response. Solution accepted.
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.