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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:-)
ASKER
Many Thanks for the quick response. Solution accepted.