Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File, JTextField  RSS feed

 
hema narayan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am having a problem that i am calling an AWT FileDialog and then writing the names of the files opened in a file along with their paths. From that file i am reading the filenames along with the paths and adding them in the file menu as menuitems,
so that when the user clicks upon that menu item that file opens up, as shortcut for the files opened previously(similar to what we see in the MSword, KAWA's FileMenu). But when i transfer all my files to some other system the file containing the names of the files along with their paths, also gets transfered.
So on the other system the FileMenu contains the same names of the files,along with their path as it had in the previous system.
Thus when the user clicks upon the menuitem it gives the FileNotFoundException as it is not able to locate that file with the given path.Thus, please guide me out the way,that the file containg the filenames along with thier paths does not gets transfered along with the other files. So that this exception does not occur.
Similar kind of a problem i am coming across but in the case of JTextField, there i am giving the default filename(along with the path)that appears in the TextField. When that dialog containg that filename gets transfered to some other system then same error occurs.
i hope u will send an early reply to me,
bye.
reply soon..
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really understanding why the app is getting transferred to other boxes but. You could check before you put the filename onto the GUI. If you get the FileNotFound don't display it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!