title: How can I use Drag-and-Drop in Swing to get file path?
body: <p>I have a <code>JTextField</code> in my <em>Swing</em> application that holds the file path of a file selected to be used. Currently I have a <code>JFileChooser</code> that is used to populate this value. However, I would like to add the ability for a user to drag-and-drop a file onto this <code>JTextField</code> and have it place the file path of that file into the <code>JTextField</code> instead of always having using the <code>JFileChooser</code>.</p>
  <p>How can this be done?</p>