@Override
    public void drop(DropTargetDropEvent e)
    {
        if (e.isLocalTransfer())
        {
            Transferable tr = e.getTransferable();
            DataFlavor[] flavors = tr.getTransferDataFlavors();
            
            try
            {
                if (flavors != null && flavors.length > 0 && tr.getTransferData(flavors[0]) instanceof String)
                {
                    String command = (String) tr.getTransferData(flavors[0]);
                    
                    if (command.equals(OBJ_CIRCLE) || command.equals(OBJ_SQUARE) || command.equals(OBJ_GROUND))
                    {
                        e.getDropTargetContext().getComponent().requestFocusInWindow();
                        
                        pModel.createObjectOnCanvas(command, new Point(e.getLocation().x, e.getLocation().y));
                        
                        fireMouseExitedToSource(e);
                        e.acceptDrop(e.getSourceActions());
                        
                        e.dropComplete(true);
                        return;
                    }
                    else
                    {
                        // should never occur
                        System.err.println("Unknown Drop Command");
                    }
                }
            }
            catch (UnsupportedFlavorException | IOException ex)
            {
                System.err.println("Something went wrong while dropping some Flavor");
                ex.printStackTrace();
            }
            
        }
        System.err.println("Drop rejected. Foreign component.");
        fireMouseExitedToSource(e);
        e.rejectDrop();
        e.dropComplete(false);
    }