i've edited the code, can you please tell me how i can write each line at the end of the file? Here it's been written on the same line. Can you help please?
private void okMouseClicked(java.awt.event.MouseEvent evt) {
String pass = name.getText();
if (pass.equals("")){
error.setText("Name of Entity should not be left blank");
//JOptionPane.showMessageDialog(null,"Name of Entity should not be left blank");
}
else{
try{
Formatter outfile = new Formatter(new FileOutputStream("Convert.sql", true));
outfile.format("Create Database IF NOT EXISTS " + pass + ";");
outfile.close();
}
catch(FileNotFoundException fnfe){
System.out.println("Not found");
}
this.dispose();
}
}