I am using Netbeans in order to create a small project in which the user inputs details for ordering cardboard boxes. The user must enter a client name, a postcode, and dimensions of the box. From there by pressing a number of calculation buttons, the program calculates surface area, cubic capacity, the cost for a single box and the total cost of the order.
The issue that I am having is when the user confirms the order. I have set up a text file for the data to be stored in once the user presses the confirm order button but for some reason, instead of the data being added to previous order details, the program instead replaces the previous order with the current order. This means that I can only ever have one order in my textfile.