How do I implement a drag and drop in a widget?

I just wanted to share another way I came up with doing this. It only requires a single widget, and the nodes below, then put your widget wherever you want in your UI and it will be draggable.