A newbie's questions regarding drawing

I'm new to JBox and have questions about drawing.
I've fooled around with the testbed and decided to create my own world but I'm not too sure on how to go about drawing it.

I have concluded that I'm supposed to create another class that implements debugDraw, fill in the missing methods and use a method called drawDebugData, but how exactly do I do that?

Could I just double buffer, paint the world on a canvas and repaint the bodies within the world as they move?

If anyone could point me to an example of such a class (besides the testbed) it would be much appreciated.
The only things you ever need to draw (or in the examples anyway) are rectangles, circles and lines.

Just loop through all your objects, find what type they are and draw the shape at their position and angle (body.getPosition() body.getAngle())
you can also loop through their fixtures to get the exact positions if you need to draw lines between them. Otherwise you know the exact size of the objects when you create them 😉

It doesn't matter how you do it really, you can use whatever method for drawing you want, Swing, processing, opengl, it doesnt make a difference.

Original thread: https://box2d.org/forum/viewtopic.php?t=8050