}
@Override
public void drop(final DragAndDropEvent dropEvent) {
final Transferable transferable = dropEvent.getTransferable();
final Component sourceComponent = transferable.getSourceComponent();
if (sourceComponent instanceof WrappedComponent) {
final TargetDetails dropTargetData = dropEvent
.getTargetDetails();
final DropTarget target = dropTargetData.getTarget();
// find the location where to move the dragged component
boolean sourceWasAfterTarget = true;
int index = 0;
final Iterator<Component> componentIterator = layout
.getComponentIterator();
Component next = null;
while (next != target && componentIterator.hasNext()) {
next = componentIterator.next();
if (next != sourceComponent) {
index++;
} else {