code: public static void main(final String[] args)
      throws Exception
    {
      if (args.length < 1) {
        LOG.info("usage: example-class");
        System.exit(1);
      }
  
      final ExampleType ex = lookupExample(args[0]);
  
      final GLProfile pro = GLProfile.get(GLProfile.GL3);
      final GLCapabilities caps = new GLCapabilities(pro);
      final GLWindow window = GLWindow.create(caps);
      window.setSize(640, 480);
      window.addGLEventListener(new ExampleEventListener(ex));
      window.setDefaultCloseOperation(
        WindowClosingProtocol.WindowClosingMode.DISPOSE_ON_CLOSE);
      window.setVisible(true);
      window.setTitle("Examples: " + args[0]);
  
      final Animator anim = new Animator(window);
  
      /*
       * Close the program when the window closes.
       */
  
      window.addWindowListener(new WindowAdapter()
      {
        @Override
        public void windowDestroyed(
          final WindowEvent e)
        {
          LOG.debug("Stopping animator");
          anim.stop();
          LOG.debug("Exiting");
          System.exit(0);
        }
      });
  
      anim.start();
    }
docs: Main program.
  
  @param args Command line arguments
  
  @throws Exception On errors