+ 1

I want to add items in ArrayList from a JTextField and save it to a file

I have a button "add item". And after clicking its open a new frame and it has a textfield. Now i want to store items in a file and use it later. While invoicing. Sorry for the noob questions. I also googled but i didn't understood.

31st Jul 2018, 4:06 AM
Manjit Kumar
Manjit Kumar - avatar
1 Réponse
+ 13
File file=new File("your arbitrary direction"); FileWriter f=new FileWriter(file); f.write("what you want to write"); or f.append("what you want to write"); f.close(); hope i got your question right
2nd Aug 2018, 9:44 PM
Hosseinam
Hosseinam - avatar