This tutorial contains the basics on how you can add simple drag and drop features to your program. There is an example program that will demonstrate how this works as well.
Here is a link to this tutorial on GutHub: