can we provide the sample code just like file tag in html. ie. we have browse button and when u select the browse button u can select the file i your computer or create one file in specified directory in one computer.i have used filechooser.but unable toperform the operation just like file tag in html
I'm not sure I fully understand your request. Did you check out the Java tutorial section on JFileChooser? It contains information on how to display the appropriate type of dialog. You can configure it for Open, Save, directories or files only, and so on.
You only really use JFileChooser to get File instances using the getSelectedFile() method. Once you have this you can find the path of the selected file and then take the appropriate action (create it if the action is a save; open the file and read it for loading; just display the path as a string for information, etc).
Joined: Oct 05, 2005
using JFileChooser we can retreive a file by using getSelectedFile(). like that can we create one file under specified directory.if so tellme by which we can do this.i have tried .but no method haven't seen