Here's an example of the jointed method I tried
Code:
import org.jbox2d.testbed.tests.*;
import org.jbox2d.testbed.*;
import org.jbox2d.dynamics.contacts.*;
import org.jbox2d.p5.*;
import org.jbox2d.dynamics.*;
import org.jbox2d.common.*;
import org.jbox2d.util.blob.*;
import org.jbox2d.collision.*;
import org.jbox2d.testbed.timingTests.*;
import org.jbox2d.dynamics.joints.*;
// To work around threading problems with size
int count = 0;
// Physics things we must store
Physics physics;
Body body, body2;
void setup() {
size(640,480,P3D);
frameRate(60);
}
void draw() {
background(0);
//This is a hack to make sure that the sketch size is
//fully initialized before initializing the scene,
//which depends on the width and height values.
//Once Processing 1.0 is released, this should no longer
//be necessary.
++count;
if ( count == 10 ) {
initScene();
}
}
void initScene() {
physics = new Physics(this, width, height);
physics.setDensity(1.0f);
Body b1 = null;
Body b2 = null;
body = physics.createRect(200, 10, 260, 30);
body2 = physics.createRect(220, 30, 240, 90);
physics.createDistanceJoint(body, body2, 220, 30, 220, 30);
physics.createDistanceJoint(body, body2, 240, 30, 240, 30);
physics.createDistanceJoint(body, body2, 230, 20, 230, 40);
}