I am working on a project and I would like to know how to store data in a file, preferably a YAML file.
I have created a Swing GUI for creating an account, which contains a Username JTextPane and a Password JPasswordField, a Create JButton, and an Output.
I want it to work so that when I press the button, an ActionListener is called which will write the username and password to an accounts.yml file, which would look like this:
usernames:
leviathan: "password"
Don't worry about encryption, I will take care of that later. All I ask for is how to implement this YAML file and write to it in the code.