[Originally posted by zh3d] Hi, friends: I am new to Java 3D technology, I just made a code to let two cubes linked by a line shown on screen, it looks great! now, I need to add a behavoir to the cubes: when you click the cubes, a window(frame)will be poped out. I know I need to employ a Picking event to trigger a window, I extend a PickMouseBrhavoir class, and put a frame object inside as below: class PickframeShow extends PickMouseBehavior { Frame myframe; public PickframeShow(BranchGroup b, Canvas c, BoundingSphere s, Frame f) { myframe = f; myframe.pack(); myframe.setVisible(true); } } but, this code doesn't work, anybody here can give me a hint? Thanks in advance! Eric
|