0

this maybe a stupid question but I'm having an issue on how I can keep the information I've entered saved into Netbeans. I have a system that book groups into rooms and the user of the system will input a lot of information into it. Every time the user closes the window at the end, all information is lost and they have to enter all the information in again.

Is there a way in which I can leave data stored in Netbeans, so every time the user opens the window it's still available for the user to change?

Thanks.

user786
  • 15
  • 3
  • I am not sure, because this is not my field but this is not the type of thing that cookies do? So you could create a cookie to store the data input from each visitor. – llrs Mar 25 '14 at 13:30
  • Are you asking about how to persist user data over an application you created using Netbeans? – NESPowerGlove Mar 25 '14 at 13:32

1 Answers1

1

What you could do would be to make your application persistent. In Java, the 2 main approaches to this is to either:

  • Make your application use a database (through JDBC) or
  • Make your application use a file system with serialization methodologies such as XStream

The most standard way is to provide a Save button which explicitly stores the information upon the user's request.

Another option would be to capture the closing event which the window throws just before closing. This previous SO post should point you in the right direction.

Community
  • 1
  • 1
npinti
  • 51,780
  • 5
  • 72
  • 96