Hi,
It depends on what you mean with the word "shape".
If you mean 2D shapes, then there is the Java2D library which is already included with the JDK. And there are sample codes and JARs withthe JDK.
If you mean 3D shapes, then download the Java3D library from Sun.