hello nice to be on this forum. i am learning Java and i am building an application. i am using netbeans as my IDE. i have a text area , text fields and a button to generate a receipt in the text area when clicked( fill the data in the text field in the text area so i can print as a receipt. Iwant to to write a code that when the button is clicked, the data in the text field is displayed in the text area and if another data is entered and clicked it will be displayed in the next row. this is the code i have used: textarea.setText("****************************************************************************\n"); String fun,fun2; fun = textfield.getText(); fun2 = textfield.getText(); textarea.setText(textarea.getText()+fun + "\n" +fun+"\n"); textarea.setText(textarea.getText()+"Item Dimension Quantity Price " ); this code works when a button is click but when i enter new information it overrides the existing which is not what i want i need help please