void (DropTargetDropEvent e) { e.acceptDrop(DnDConstants.ACTION_COPY); var paths = FileCopyPasteUtil.getFiles(e.getTransferable()); if (paths != null && !paths.isEmpty()) { myPanel.load(paths.get(0)); e.dropComplete(true); } else { e.dropComplete(false); } }