Take a look at Processing
It is a Java-based visualization tool aimed at quick development time. It offers both 2D and 3D rendering modes.
It comes with its own editor, but its compiled code can be used along with your other Java code.
However, do note that its 3D mode uses JOGL.
EDIT
Quick link to some of their 3D examples with source: http://processing.org/learning/3d/