I wish to select and drag text from a JTextField (or any text-like component will do for now) to any other application outside of the VM as if it were a cut or copy operation. I have had no success playing with TransferHandler, but a quick search of this forum suggests no simple solution.
However, I know of one application (Intellij IDA 4.5.3), that claims pure Java, and is capable of such behaviour, but it is closed source. For example, I can select text from the editor, put my mouse over it, the mouse cursor displays an arrow, hold down the left mouse button and drag the text to any text editor (such as notepad on Windows). This behaves as if it were a simple cut/paste operation.
I looked at the example and was able to understand the basics and modify it to suit my needs, but for a JLabel only.
The reason being, when I highlight some text in a JTextField, it acts as if I'm performing a drag operation. As soon as one character is highlighted, I am now dragging and can drop that one character somewhere. I tried fiddling with things to try to allow me to drag only once text has been selected, and the mouse has been released, but I soon found myself writing "spaghetti code" that didn't really work anyway.