// Mechanism for closing the window and ending the program.
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Default settings for the viewer parameters.
myCanvas3D = new Canvas3D(SimpleUniverse.getPreferredConfiguration());
// Construct the SimpleUniverse:
// First generate it using the Canvas.
SimpleUniverse simpUniv = new SimpleUniverse(myCanvas3D);