String location = txtAuthorLocation.getText();
int age = Integer.parseInt(txtAuthorAge.getText());
String details = txtAuthorDetails.getText();
Author author = new Author();
AuthorModel authorModel = new AuthorModel();
author.setFull_name(full_name);
author.setLocation(location);
author.setAge(age);
author.setDetails(details);
int flag = authorModel.save(author);
if(flag == 1)
{
JOptionPane.showMessageDialog(null, "Author added !", "Message", JOptionPane.INFORMATION_MESSAGE);
clearAllTextFields();
}