![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e894. Copying the Filename Path from a JFileChooser Dialog to the ClipboardTyping 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:C:\Documents and Settings\Administrator\Start Menu\Programs\Internet Explorer.lnkIf 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: <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>
e888. Displaying Only Directories in a File Chooser Dialog e889. Adding a Filter to a File Chooser Dialog e890. Determining If the Approve or Cancel Button Was Clicked in a JFileChooser Dialog e891. Getting and Setting the Current Directory of a JFileChooser Dialog e892. Getting and Setting the Selected File of a JFileChooser Dialog e893. Getting the File-Type Name of a File
© 2002 Addison-Wesley. |