if(e.getActionCommand().equals(\"save to file\")) { System.out.println(\"save is pressed\"); StringBuffer fileContent = new StringBuffer();
Consider saving just the TableModel data using java.util.Preferences, exemplified here, or javax.jnlp.PersistenceService, cited here.
TableModel
java.util.Preferences
javax.jnlp.PersistenceService