user1316160
user1316160

Reputation: 1

Java text field history in applet

I have a simple Java applet with several text fields for input. I would like to be able to somehow cache what the user enters into these fields so that next time they run the applet, they can make a selection from a list of previous inputs.

I have been searching forums and sites and cannot find any way to do this for applets.

Does anyone have a suggestion or a kick in the right direction?

Upvotes: 0

Views: 168

Answers (2)

Andrew Thompson
Andrew Thompson

Reputation: 168835

As well as cookies, here are a few more possibilities.

  • HTML5 offers Web Storage which can be accessed from the applet using JS.
  • An applet running in a Plug-In 2 JRE can be deployed using JWS and use the PersistenceService to store data. Here is a demo. of the PersistenceService.
  • A trusted applet can read/write the local file-system, but probably overkill for this.

Upvotes: 1

Valkyrio
Valkyrio

Reputation: 33

If you're running this in a browser, you could try using cookies.

Upvotes: 1

Related Questions