This applet constructs a spinning cube to fit in the view window.
For a short tutorial on this sample click this button:
View Java Source Code