title: How to show JBox2D object in android activity?
body: <p>I write a code for showing circle body by using jbox2D. But when is run this code i got blank screen. Now how to show this rigid body on screen. is i need to use any view for showing it on screen ?please help..</p>
  
  <pre><code>import org.jbox2d.collision.shapes.CircleShape;
  import org.jbox2d.common.Vec2;
  import org.jbox2d.dynamics.Body;
  import org.jbox2d.dynamics.BodyDef;
  import org.jbox2d.dynamics.BodyType;
  import org.jbox2d.dynamics.FixtureDef;
  import org.jbox2d.dynamics.World;
  
  import android.app.Activity;
  import android.os.Bundle;
  
  public class FirstBox2DGameActivity extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  //       setContentView(R.layout.main);     
          Vec2 gravity = new Vec2(0.0f, -10.0f);
          boolean doSleep = true;
          World world = new World(gravity, doSleep);
  
          // Body definition is created as below.
          BodyDef bd = new BodyDef();
          bd.position.set(100, 200);
          bd.type = BodyType.STATIC;
  
          // body Shape
          CircleShape cs = new CircleShape();
          cs.m_radius = 5.0f;
  
          // Fixture defines the material properties of the body. Fixtures are
          // also used for attaching shape to the body. These material properties
          // describe how two bodies should react when they collide with each
          // other.
          FixtureDef fd = new FixtureDef();
          fd.shape = cs;
          fd.density = 0.5f;
          fd.friction = 0.3f;
          fd.restitution = 0.5f;
  
          // Now final step is to create a body and add fixture to it. The bodies
          // are created using World class.
          Body body = world.createBody(bd);
          body.createFixture(fd);
      }
  }
  </code></pre>