You can use a trigger, like this
scene.addTrigger(new ContactTrigger(box, 2.0, new Callback(){
@Override
public void contactAboveThreshold(Body interactingBody,
ContactConstraint constraint) {
System.out.println("In contact with " + interactingBody );
}
@Override
public void contactBelowThreshold(Body interactingBody,
ContactConstraint constraint) {
System.out.println("No longer in contact with " +
interactingBody );
}
}));
I just made an example illustrating this. Update both jinngine and
jinngine.examples to make it work. Hope that is what you need :)