Java3D collision dtection cannot be used for simulation of two physica; objects colliding because you do not get the information on the collision until some tiem AFTER the interpenetration has been rendered. It notifies you that a collision has ocurred some tiem in the past, but not necessarily exactly on the frame that collision first occurs.
For this kind of collision detection (sometimes called collision avoidance) you have three choices:
(1) Use pick rays to shoot out ahead of your object in the movement direction, find the maximal distance the objectcan travel before it collides with the environment, and clip your motion to match.
(2) Use the Java bindinsg to ODE to do your collision detection.
(3) Implement a real per-frame game style collision system from the ground up in Java.
#1 is really only suitable for simple “toy” problems but might be enough for you.
#2 is a fair bit of work, requires you use a native library, and adds a lot of memory overhead because ODE is a native lib with JNI bindings and it keeps its own representation of the workld that you have to keep synchronized with the J3D scene graph.
#3 requires you know a fair bit about collision detection algorithms. Shawn Kendall at IMI is currently writing a Java3D integrated physics library. When done it should be the easiest path to this rto of thing but hes still in Alpha on it. (Im using it in a project of mine as an Alpha tester.)