Problem with texturing an object

I try to make a sidewalk using a box. I am trying to texture the box I couldn't do it how I want it.

My code is here:

Box box = new Box("Box" + (number - 1) , new Vector3f(y , 0, x),
            new Vector3f(yMax, 0.05f, xMax));;

      box.setModelBound(new BoundingBox());
      box.updateModelBound();
      box.setLocalScale(scale);

      TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();
      //Base texture, not environmental map.
      Texture t0 = TextureManager.loadTexture(
            SidewalkBuilder.class.getClassLoader().getResource(
                  "res/texture/sidewalk.jpg"),
                  Texture.MinificationFilter.BilinearNearestMipMap ,
                  Texture.MagnificationFilter.Bilinear);
      t0.setWrap(Texture.WrapMode.Repeat);
      t0.setScale(new Vector3f(1f,1.0f, 1f));
      ts.setTexture(t0);
      ts.setEnabled(true);      
      CullState culling = DisplaySystem.getDisplaySystem().getRenderer().createCullState();
      culling.setCullFace(CullState.Face.Back);
      box.setRenderState(culling);
      box.setRenderState(ts);
      box.updateRenderState();
      sidewalk.attachChild(box);



I get this picture, but it's not very realistic. I want that the texture repeat itself on box.


The texture picture is 512*512 pixels:

I found the solution in jmetest.renderer.TestBox. Thank's for answering me :slight_smile: