The image you see below is a BufferedImage representation of a PDF. The bufferedimage is in an imageicon that is contained in a jlabel.
What I am attempting to do here is to be able to drag that image out to another application in my system. If I drag any document (including images) into that application it accepts it. I need to drag drop this into that application as a PDF. I am using PDFBOX to help manipulate pdfs. My end users HAVE TO HAVE this implemented as drag drop. The other application that will be accepting these documents is written in a way so that once the document is in the system it cannot be removed and so drag drop will be the best way for them to do so.
Because, however, the image is contained in a jlabel I cannot drag it out, or at least I cannot find a way to do so. I can drag into a jlabel, but dragging out does not appear to be an option.
This is my first attempt at doing a drag drop built into an application of mine and I can only see the ability to drag a file url onto the desktop. Is there some way for me to be able to drag this (url or otherwise) out of the window at least onto the desktop? I am thinking that if I can get it onto the desktop I can get it into the other application.
I can save the file temporarily as a PDF which I believe I am going to have to do, but I just don't know how to get this file out of the JLabel. Any help is greatly appreciated.