So everytime someone clicks sign up on my program, I call a method that opens file and adds record.
This is to open the file:
try {
l = new Formatter("chineses.txt");
System.out.println("Did create");
} catch (Exception e){
System.out.println("Did not create");
}
public void addRecord(){ //This is how i add the record
l.format("%s", nameField.getText());
}
Everytime I put in a name in the name field and click sign up in my gui, it always replaces whatever is on the first line in the text file.
How can I make it go to the second line while retaining what is on the first line each time someone else puts their name and clicks sign up?