CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2010

    Get current directory from JFileChooser

    Hello, Im trying to get the current directory out of my JFileChooser. I would like to turn this current directory to a string, something like String userdir = fc.getCurrentDirectory(); This obviously doesnt work. Is there anyway to do this?

  2. #2
    Join Date
    May 2006

    Re: Get current directory from JFileChooser

    Read the API docs.

    getCurrentDirectory() returns a File object and the File class has many methods for extracting the file information as a string.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.