Help with rotating object with mouse

Basically I have a box with lots of balls inside, the box is on a pivot in the center of the screen. The user rotates the box by clicking on it and dragging. Currently I use a mouse pivot to make this work but the problem is that its to springy and sharp movements make the box swivel after you stop moving. My current setup makes it generally difficult to rotate the box the way you want it.

Ive tried to work out a way to do it better but I am fairly new to box2D and haven't had much luck.
Give the box some angular damping, and increase the strength of the mouse joint. You still won't see instant movement (which is not desirable for a physics simulation), but it'll cut down on wobble.
In case if you want to stop rotation on mouseJoint just change
b.m_angularVelocity *= 0.98;
to
b.m_angularVelocity *= 0;
in b2MouseJoint.as file.

Hope this will help you.
Regards
Rajesh

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