What I want to do is drop files onto a JTextArea and have it read the file name. It sounds simple enough but it is not because I am crossing the JVM boundary. Because I want to use native data types in the JVM it gets more complicated. In the routine I have specified my data flavor as "javaFileListFlavor" but that will never fly because I am getting data from the OS. By the way, this will be a multiple-platform application (Windows, Linux, Unix, Macintosh).
The error I get is as follows: Unsupported Flavor, application/x-java-file-list
I have read quite a few articles on this, I see that I need to somehow construct a FlavorMap using SystemFlavorMap by calling something called getNativesForFlavors which returns a map of flavors. Now, look here what it says about this map:
The Map object returned by both methods may be mutable but is not required to be,
these mappings are held in an external persistent configuration format and are loaded
from the platform to configure the FlavorMap appropriately for a given platform.
Does anyone have some clear examples of code that uses this? I am really confused at this point as to how I can bring this all together.
Thank you in advance for any help you might be able to offer or guidance to lessen my confusion