Add EventListener to a Node/BranchGroup...Generate code by clicking
843799May 21 2010 — edited May 24 2010Hi to everybody!
I have a problem with java 3D... i hope you will be able to help me!
In java 3D i have realized a 3Dworld in which i have put several geometry.Box (they are automaticaly placed).
Each Box has a texture taken from a a dataset of pictures in a directory. (the idea is that the boxes with the textures correspond to a preview of the photo).
What is missing is that when the user click on the box, a new window containing the picture (the same of the texture but bigger and in high resolution) will be opened.
If there were a JButton and not a Geometry.Box i will be able to solve the problem, becouse i will add an ActionListener to the JButton and then i will realize the function implementing the ActionPerformed code. However, i can't find an "ActionListener" or an "EventHandler" to add neither to the Node (the Box with the texture) neither to the BranchGroup (or TransformGroup) the box is referring to.
Can someone help me?
Or does anybody have any idea or suggestions to solve the problem in a different way?
Thanks a lot!