how to link filename with its path



I have made a java swing application where clicking on a a button opens the file. Working : * I gets the filePath in a jTable Row . * Updates the content of that row in an XML using JDOM parser * Uses the XML to update back the jTable row.


Problem : 1- I gets the filepah using FileChooser but want to display only its FileName( can be done using .getName()) 2- When the above problem is met i loses the path. So when i update only th fileName gets stored.


Help needed: 1- Want to show only fileName in my jTable 2- Want to update my XML with the whole Path


Is it possible to do this :)


Thanks in advance.


No comments:

Post a Comment