I have a public method that adds some text from textfield into .txt file, although it works only once. I want that button to add new line of text everytime I click the button (so we can change text in textfield and add it to new line...).
try {
ncw = new PrintWriter("database.txt");
ncw.write(nctext.getText());
ncw.close();
} catch (IOException ae) {
System.out.println("IO Exception");
}
}
What should I do?