i have a jtextfield and jtextarea. The textfield displays a file name. Please provide me the code to drag the filename into the textarea , so that the text area displays the fie contents....
That won't be only a little code! First of all, you have to somehow write code, that reacts to you wanting to drag the name from the JTextField (maybe a MouseListener?), then you'll have to make sure it will be draged, next thing you will have to tell the JTextArea what to do, when it gets a Filename draged onto it.
It would be much easier to just have a "Load" Button, which starts a function to read out the Filename from the JTextField, find the File and open the contents in the JTextArea.
By the way, why would you want to have a Filename in a TextField and then want to drag it?
Greetings,
Nepomuk