• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

File, JTextField

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic