private void stopDrag(MouseEvent event){
  IEntity entity=dragged.getEntity();
  DropTarget target=getCurrentDropTarget();
  if ((target != null) && target.canAccept(entity) && (target instanceof Component)) {
    if (entity != null) {
      Point componentPoint=SwingUtilities.convertPoint(this,point,(Component)target);
      if (showAmountChooser(event,entity)) {
        DropAmountChooser chooser=new DropAmountChooser((StackableItem)entity,target,componentPoint);
        chooser.show((Component)target,componentPoint);
      }
 else {
        target.dropEntity(entity,-1,componentPoint);
      }
    }
  }
  dragged.release();
  dragged=null;
}

private void stopDrag ( MouseEvent event ) { IEntity entity = dragged . getEntity ( ) ; DropTarget target = getCurrentDropTarget ( ) ; if ( ( target != null ) && target . canAccept ( entity ) && ( target instanceof Component ) ) { if ( entity != null ) { Point componentPoint = SwingUtilities . convertPoint ( this , point , ( Component ) target ) ; if ( showAmountChooser ( event , entity ) ) { DropAmountChooser chooser = new DropAmountChooser ( ( StackableItem ) entity , target , componentPoint ) ; chooser . show ( ( Component ) target , componentPoint ) ; } else { target . dropEntity ( entity , - 1 , componentPoint ) ; } } } dragged . release ( ) ; dragged = null ; }
stop dragging the item , and let the component below the cursor handle the dropped entity .
