*/
    public void drop(DropTargetDropEvent event) {
        try {
            // check to make sure that event type is ok
            if (!isDropAcceptable(event)) {
                event.rejectDrop();
                return;
            }
            // accept the drop action, must do this to proceed
            event.acceptDrop(DnDConstants.ACTION_COPY);
            Transferable transferable = event.getTransferable();
            DataFlavor[] flavors = transferable.getTransferDataFlavors();
            for (DataFlavor dataFlavor : flavors) {
                // Check to see if a file was dropped on the viewer frame
                if (dataFlavor.equals(DataFlavor.javaFileListFlavor)) {
                    List fileList = (List) transferable.getTransferData(dataFlavor);
                    // load all the files that where dragged
                    for (Object aFileList : fileList) {
                        File file = (File) aFileList;
                        if (file.getName().toLowerCase().endsWith(".pdf")) {
                            openFileInSomeViewer(file);
                            ViewModel.setDefaultFile(file);
                        }
                    }
                } else if (dataFlavor.equals(DataFlavor.stringFlavor)) {
                    String s = (String) transferable.getTransferData(dataFlavor);
                    int startIndex = s.toLowerCase().indexOf("http://");
                    int endIndex = s.toLowerCase().indexOf(".pdf");
                    if (startIndex >= 0 && endIndex >= 0) {
                        s = s.substring(startIndex, endIndex + 4);
                        URL url;
                        try {
                            url = new URL(s);
                            openURLInSomeViewer(url);
                            ViewModel.setDefaultURL(s);
                        } catch (MalformedURLException e) {
                            // eat the error
                        }
                    }
                }
            }
            event.dropComplete(true);

        } catch (IOException ioe) {
            ioe.printStackTrace();
        } catch (UnsupportedFlavorException ufe) {
            ufe.printStackTrace();
        }
    }