Win a copy of The Java Performance Companion this week in the Performance forum!
    Bookmark Topic Watch Topic
  • New Topic

How to save a JTree content in a Text file and vise-versa

 
rohit singh Patel
Greenhorn
Posts: 4
Java Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

I'm new in java and for one project i need to create such application which could read data from a text file and when i exit from my app it should save change which we made in our Jtree.

We have completed the reading from text file thing (somehow) now i'm not able to save the Jtree back to text file.

Thanks
 
rohit singh Patel
Greenhorn
Posts: 4
Java Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
rohit singh Patel wrote:We have completed the reading from text file thing (somehow) now i'm not able to save the Jtree back to text file.

somehow, I get a feeling that you have not written this code or even read/understood this code. If you do that, you can easily save back the contents.

And I don't see any code which tries to save back the contents to the file. So, first, ShowSomeEffort, write code and try running that...and if it still doesn't work, get back to us with details...
You can go through this tutorial to understand JTree.
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
ah...just found this out...
this post is a duplicate of this post 1 which itself is a duplicate of post 2.
I have already replied in the other post and you seem to have ignored that and created a new one. Which means I have simply wasted my time

Wanted to inform others before they waste their time...
 
Campbell Ritchie
Sheriff
Pie
Posts: 49446
62
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thread locked. Thank you for noticing.
    Bookmark Topic Watch Topic
  • New Topic