1 Reply Latest reply: Dec 20, 2006 6:28 AM by 807607 RSS

    delete a line in textfile?

    807607
      hello,

      how can I delete a specified line in a textfile.
      The text file created by file.write() method in a folder(ex. D:/xy.txt).

      My program problem is, hen I click on item in JList, the selected item deleted from the text file where I previously stored the values.

      like,

      xy.txt
      -------------
      hello, It a funny thing. ---> line 1
      dsfdsfsdfdfgggg ---> line 2


      I want to delete line 1 from the text file.

      how can i do it.