How do i get the path of the file selected for opening in JFileChooser

hi
I need to get the path of the file selected for opening or saving in the JFileChooser dialog box.Is there any method available.if not how do i get that?
Thanks and Regards
Saminathan.

don't know if its the best/only way, but you could use the getSelectedFile() method in JFileChooser which returns a file and then use the getAbsolutePath() file method

Similar Messages

  • C Programming: How can we get the filesystem name for a given file-path?

    C Programming: How can we get the filesystem name for a given file-path?
    Say I have a filepath=/mnt1/file1
    Using some OS API like stat, can I get the Filesystem /mnt ?
    Thanks in advance,
    -V

    Enter the command up to the point of entering the file path and add a space, then drag the file into the terminal window. It will fill out the path.
    If you need to go further into the contents of the Application package, you can continue with /Contents...
    Another way is to start typing and then hit Tab to auto-complete. It will stop where it can't determine the next letter.
    So, type /App tab and it will fill in /Applications. Type a / and start with the name of the app, then tab and it should complete. Continue till you have the correct path.
    Spaces will be replaced with \<space>, so, App Store would end up as /Applications/App\ Store.app

  • How do I get the file name?

    I'm kind of new to javascript -- working with a colleague who has Adobe Acrobat Professional -- I've got an *old* version of Adobe Acrobat and most of the functions don't work -- but how do we get the file name -- we're trying to develop an application -- so if the user opens c:\something.pdf, we'd like to know the file name (something.pdf).
    If we get a fully qualified path, that's fine -- I think I can parse it.
    Thank you in advance.

    The 'paty' property of the 'doc' object has been available since version 3.01.
    Using the following in the JavaScript console when the Acobat JS API Refenece is open:
    this.path;
    returns:
    this.path;
    /C/Program Files/Adobe/Acrobat 8.0/Help/ENU/JS_api_reference.pdf

  • How can I get the elapse time for execution of a Query for a session

    Hi ,
    How can I get the elapse time for execution of a Query for a session?
    Example - I have a report based on the procedure ,when the user execute that it takes say 3 min. to return rows.
    Is there any possible way to capture this session info. for this particular execution of query along with it's execution elapse time?
    Thanks in advance.

    Hi
    You can use the dbms_utility.get_time tool (gives binary_integer type value).
    1/ Initialize you time and date of beginning :
    v_beginTime := dbms_utility.get_time ;
    2/ Run you procedure...
    3/ Get end-time with :
    v_endTime := dbms_utility.get_time ;
    4/ Thus, calculate elapsed time by difference :
    v_elapsTime := v_endTime - v_beginTime ;
    This will give you time elapsed in of 100th of seconds...
    Then you can format you result to give correct print time.
    Hope it will help you.
    AL

  • Whenever I update my iPhone software, it asks me to sign in to iCloud with an old email address.  My other devices all have the correct address.  How can I get the correct address for my iPhone?  The only Apple ID that works for logging in is my new one.

    Whenever I update my iPhone software, it asks me to sign in to iCloud with an old email address.  My other devices all have the correct address.  How can I get the correct address for my iPhone?  The only Apple ID that works for logging in is my new one.

    To change the iCloud ID you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID when prompted to turn off Find My iPhone (if you're using iOS 7), then sign back in with the ID you wish to use.  If you don't know the password for your old ID, or if it isn't accepted, go to https//appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • The bookmarks toolbar is there but has no item buttons on it. How do I get the items back for this toolbar? Also would like to know if the toolbars can be put on the same line to make more room on the page (drag & drop) ??

    The bookmarks toolbar is there but has no item buttons on it. How do I get the items back for this toolbar?
    Also would like to know if the toolbar can be put on the same line to make more room on the page (drag & drop) ?? Like the menu & bookmarks toolbar could/should fit on same line. This would add more page view...
    Floyd Perry
    Thanks

    Check that you still have the "Bookmarks Toolbar items" placed on the Bookmarks Toolbar
    * Make sure that you have the "Bookmarks Toolbar" visible: "View > Toolbars"
    * Check in "View > Toolbars > Customize" that the "Bookmarks Toolbar items" is on the Bookmarks Toolbar
    * If the "Bookmarks Toolbar items" is not on the Bookmarks Toolbar then drag it back from the Customize window onto the Bookmarks Toolbar
    * If you do not see the "Bookmarks Toolbar items" then click the "Restore Default Set" button
    You can only move the content from a toolbar onto other toolbars if all toolbars support that feature. You need to check that in the options of each toolbar.

  • How do I get the file names on a customized proof sheet?

    How do I get the file names on a customized proof sheet?

    Actually, I really don't know what you say.
    But when you see the properties of a file in Windows, you can see there are two file size. One is called "SIze" and the other one is called "Size on disk".
    Therefore, I would like to know the size on disk but not just the size.

  • How do I get the printer driver for a hp officejet 6500 e709n?

    How do I get the printer driver for a hp officejet 6500 e709n? When I add the printer, Apple says the software is not available and to contact the manufacturer. HP says it is available from Apple.

    Hi Robmtu,
    You can find the direct download here.

  • I recently subscribed to Acrobat XI after the trial expired but when I went to activate it I was asked for the serial number. I only have the order number on the invoice. How do I get the serial number for the trial software that is on my computer?

    I recently subscribed to Acrobat XI after the trial expired but when I went to activate it I was asked for the serial number. I only have the order number on the invoice. How do I get the serial number for the trial software that is on my computer?

    Please do not try to send attachments in mail responses to forum messages. Please return to the forum and click Reply. You can then use the CAMERA icon to add your pictures. Looking forward to seeing what is wrong with your license screens - the general advice is simply to sign in, and everything is done. Make sure you use the SAME Adobe ID that you used to purchase, and check your account details to be sure the subscription is active.

  • How do I get the little icons for bookmarks to reappear in my pulldown menu?

    How do I get the little icons for bookmarks to reappear in my pull down menu? When I go to Bookmarks, and I go to Bookmarks Toolbar, the list of bookmarks used to have the little logos/icons associated with the company, etc. I liked these. When v9.0.1 updated, I lost these. Can they come back? Thanks for a great browser! Gene Newman, West Bloomfield, MI
    I use MacBook Pro, 2010, OSX 10.6.8 (Snow Leopard); Firefox version 9.0.1

    See also:
    *CheckPlaces: https://addons.mozilla.org/firefox/addon/checkplaces/
    *Bookmark Favicon Changer: https://addons.mozilla.org/firefox/addon/bookmark-favicon-changer/

  • I've change device Ipone4s to Ipnoe 5 . How to i get the old game for game center

    I've change device Ipone4s to Ipnoe 5 . How to i get the old game for game center

    Regarding the old iMac.  Just delete your USER NAME from the Control Panel.  Go into System Preferences - then User/Groups and delete your account from there.
    Just a bit of advice though before you do all this, go and buy yourself a remote Hard Drive, they're really good value today and copy off all of your sacred files from your old computer onto the new drive.  You could also do the same via the Backup.app    
    It's well worth doing....    You can easily delay the switch over for a few days and you'll then have a backup disc that you'll start to use again and again.

  • In flash pro cc, how do i get the files i was working on previous session to open automatically?

    in flash pro cc, how do i get the files i was working on previous session to open automatically?

    cs4 had it 'on launch' --> last documents open, under general preferences. i don't see it in cc version, so i guess you're right. hard to understand, since it saved time.

  • I purchased the Logitech F310 game controller for my 2011 MacBook Pro. How do I get the driver installed for it. The Disk that came with the controller is a mini disk and will not insert into my laptop.

    I purchased the Logitech F310 game controller for my 2011 MacBook Pro. How do I get the driver installed for it. The Disk that came with the controller is a mini disk and will not insert into my laptop.

    May not make a difference anyway. The Logitech support site does not show drivers for Mac OS for the F310:
    http://www.logitech.com/en-us/support/gamepad-f310?crid=411
    I'd contact their support to find out if there is a Mac driver available, and if they can either give you a web link to get it, e-mail you the software, or snail-mail you a standard-size disk with the drivers.

  • How I can get the Billing Type for the sales order and its items

    How I can get the Billing Type for the sales order and its items. I mean from which SAP tables and how?

    Hi,
    You need to use two tables.
    First use VBFA. Enter the sales order number in the field Predecessar and the value M in SubCt field. This will give all the billing document number for the sales order items.
    Then use the billing document numbers in table VBRK, where in you can get the billing document type.
    Regards,

  • How can I get the File, Edit, View, Windows ect to show in Organiser

    While on various tutorials they all show a
    menu of file, edid, view ect in the top left hand corner of the screen, mine shows only a small square box that when clicked give you the option of restore, close minimise ect. How can I get the file edit menu to show. Should have said in Photoshop Elements 9.

    Thanks Barbara that's done the trick

Maybe you are looking for

  • How to change the Size of a Column in TimesTen

    I have a Column of type VARSHAR2(32). I would like to increase the size to 255; Is the only to do this is to drop the table and add it again?

  • F-47 Down Payment Request - Error Message F5053

    Dears, I'm working on a 4.7 SAP R/3 release and, as trying to post a down payment request from transaction <b>F-47</b> with Special Ledger indicator "T", I get Error Message F5053: "The specified special G/L indicator is not classified as "down payme

  • Cd or dvd

    how many songs will fit on a cd? and does anyone use dvd for music only in order to pack on lots of songs on one disk? is that possible? are there different settings to use when outputting? best, M/

  • USER_DATASTORE: Could DBMS_LOB be leaking memory?

    We've got a database which is indexed with USER_DATASTORE and the following procedure. We're getting an occasional situation where this message appears in the alert log: ORA-04030: out of process memory when trying to allocate 8716 bytes (pga heap,Ge

  • Macbook pro retina erratic trackpad issues

    Mapbook pro with retina display trackpad has erattic behavior after 2 - 3 minutes of use.  The behavior is most noticeable in Final Cut Pro X.  When dragging and dropping clips, multy touch gestures will trigger unintentionally, causing the app to sw