# sDrop image P2D

**URL:** <https://discourse.processing.org/t/sdrop-image-p2d/25130>\
**Category:** Libraries\
**Created:** [November 2, 2020, 10:47am UTC](https://discourse.processing.org/t/sdrop-image-p2d/25130 "2020-11-02T10:47:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matheplica](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/matheplica/32/21035_2.png) [@matheplica](https://discourse.processing.org/u/matheplica)\
**Post date:** [November 2, 2020, 10:47am UTC](https://discourse.processing.org/t/sdrop-image-p2d/25130/1 "2020-11-02T10:47:49Z")

</div>

Hi, I’m trying to drag and drop an outside Image in my PApplet with sDrop library but I use P2D renderer. With this renderer is not working but without is it. There is a way to go around, I really need this ? Thanks

---

<div class="post-metadata">

**Author:** ![matheplica](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/matheplica/32/21035_2.png) [@matheplica](https://discourse.processing.org/u/matheplica)\
**Post date:** [November 3, 2020, 3:15pm UTC](https://discourse.processing.org/t/sdrop-image-p2d/25130/2 "2020-11-03T15:15:06Z")

</div>

I found an alternative with Java but It’s very difficult to understand.  
I have no bugs with this code but nothing happens

```auto
import java.awt.dnd.*;
import java.awt.datatransfer.*;
DropTarget dt;
void setup() {
    size(500, 500, P2D);
    dt = new DropTarget(frame, new DropTargetImplementation());
    dt.setComponent(frame);
    dt.setActive(true);
}
private class DropTargetImplementation extends DropTargetAdapter{
    public DropTargetImplementation() {
    }
    public void drop(DropTargetDropEvent e){
        println("The DropPanel received the DropEvent");
    }
    public void dragEnter(DropTargetDragEvent e){
    }
    public void dragExit(DropTargetEvent e){
    }
    public void dragOver(DropTargetDragEvent e){
    }
} 

```
