1

I am working on a simple text editor.

I have a text area in a tabbed pane. When the user goes to save the file is there anyway to save the tabs as well? Here is a snap shot of what I am working on.

image

When the user has more than one tab open I would like to save those tabs so when the user reopens the file they are all still there.

Does anyone have an idea about how to do this?

If you need any snippets of code or anything else let me know.

wchargin
  • 15,589
  • 12
  • 71
  • 110
user2367327
  • 31
  • 1
  • 7
  • The only way I can think of is to create your own file that the user would open instead of the text file, otherwise you would have to somehow store the data in the text file, but that data would be visible if they opened it up in notepad or something like that. – ageoff May 30 '13 at 18:08
  • @LiverpoolFTW That's exactly how I am going to have to do it. -Thanks – user2367327 May 30 '13 at 21:50

2 Answers2

1

You might look into the Java Preferences API; it is a way of storing information that is system independent, and is organized so that you may store different values for different users, for instance.

arcy
  • 12,845
  • 12
  • 58
  • 103
0

try use JFileChooser class with ActionListener to your program. remember to include javax.swing.JFileChooser and etc from javax.swing.* and java.io

Zombdale
  • 7
  • 3