drag and drop a component

how to drag and drop a component from one layout to another layout which is initially empty.

The drag and drop example in the sampler can be a good start: http://demo.vaadin.com/sampler#DragDropRearrangeComponents

When you want to drag and drop components between two layouts, the steps are similar with the sampler (i.e. putting the layout into a custom component, assigning it into a drop handler and set the composition root of the custom component as a DragAndDropWrapper). The main difference is you need to modify the AcceptCriterion and also add additional handler to manage component transfer from another layout in the drop method of the class that implements DropHandler.