private void SaveButActionPerformed(java.awt.event.ActionEvent evt) { try{ File f=new File("Customer detail.txt"); String id = this.CusIDTxt.getText(); String name=NameTxt.getText(); String ic=ICNoTxt.getText(); String ph=PhNoTxt.getText(); String email=EmailAddTxt.getText(); PrintWriter writer=new PrintWriter(new BufferedWriter(new FileWriter("Customer detail.txt",true))); writer.println(id); writer.println(name); writer.println(ic); writer.println(ph); writer.println(email); writer.close(); JOptionPane1.showMessageDialog(this, "Register customer was successful"); m.setVisible(true); this.setVisible(false); } catch(Exception e) { JOptionPane1.showMessageDialog(this,"All fields must be completed in order to register"); } }
f
getText
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)