The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[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