Copying the Filename Path from a JFileChooser Dialog to the Clipboard
Typing control-c in a file chooser dialog copies the names of the
selected files to the clipboard. If there is only a single selected
file, the absolute path of the file is copied to the clipboard. Here
is an example:
If there are multiple selected files,
the absolute paths of the selected files are wrapped in HTML code
and copied to the clipboard. Here is an example of the HTML code:
C:\Documents and Settings\Administrator\Start Menu\Programs\Internet Explorer.lnk
<html><ol>
<li>C:\Documents and Settings\Administrator\Start Menu\Programs\Internet Explorer.lnk
<li>C:\Documents and Settings\Administrator\Start Menu\Programs\MSN Messenger Service.lnk
<li>C:\Documents and Settings\Administrator\Start Menu\Programs\Outlook Express.lnk
<li>C:\Documents and Settings\Administrator\Start Menu\Programs\Windows Media Player.lnk
</ol></html>
Post a comment