public void setupFloor() {
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        TextureKey key = new TextureKey("Interface/Logo/Monkey.jpg", true);
        key.setGenerateMips(true);
        Texture tex = assetManager.loadTexture(key);
        tex.setMinFilter(Texture.MinFilter.Trilinear);
        mat.setTexture("ColorMap", tex);

        Box floor = new Box(100, 1f, 100);
        Geometry floorGeom = new Geometry("Floor", floor);
        floorGeom.setMaterial(mat);
        floorGeom.setLocalTranslation(new Vector3f(0f, -3, 0f));

        floorGeom.addControl(new RigidBodyControl(new MeshCollisionShape(floorGeom.getMesh()), 0));
        rootNode.attachChild(floorGeom);
        getPhysicsSpace().add(floorGeom);
    }
Tests attaching/detaching nodes via joints
@author normenhansen
jme3-examples/src/main/java/jme3test/bullet/TestAttachDriver.java