简体   繁体   中英

User-generated account in JAVA FX

I am currently designing a little dice game that should involve a feature, which allows the user to create his own account by typing in a name and a password.

I've been thinking about using a constructor within the Account.java class, but i still haven't figured out how it is possible to permanently store user input so it is available the next time you run the application. How do I go about storing more than one piece of information (in this case username and password) in the same object?

Any advice? Does this type of class probably already exist in JAVA or JAVA FX?

Thanks for your help ;)

You could always opt for an embedded solution, and since you are using Java you might want to give H2 a go: https://gist.github.com/jewelsea/4955598

Here is a Git project showing how to use H2: http://www.h2database.com/html/main.html

Sounds like a Database is what you need.

http://www.devx.com/Java/Article/48193

this is a tutorial with Postgresql and javafx.

Have at it!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM