private void setUpLight() {
    // We add light so we see the scene
    AmbientLight al = new AmbientLight();
    al.setColor(ColorRGBA.White.mult(1.3f));
    rootNode.addLight(al);

    DirectionalLight dl = new DirectionalLight();
    dl.setColor(ColorRGBA.White);
    dl.setDirection(new Vector3f(2.8f, -2.8f, -2.8f).normalizeLocal());
    rootNode.addLight(dl);
  }
Example 9 - How to make walls and floors solid.
This collision code uses Physics and a custom Action Listener.
@author normen, with edits by Zathras
jme3-examples/src/main/java/jme3test/helloworld/HelloCollision.java