Example #1
0
 private void jButton4ActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton4ActionPerformed
   jDSave saveDialog = new jDSave(this, true);
   saveDialog.show();
   if (saveDialog.fileName != "") {
     Debug.saveToFile(saveDialog.fileName, model);
     jTextArea1.append("Model is saved to: ");
     jTextArea1.append(saveDialog.fileName);
     jTextArea1.append("\n");
   }
 } // GEN-LAST:event_jButton4ActionPerformed
Example #2
0
  private void jButton5ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton5ActionPerformed
    jDOpen openDialog = new jDOpen(this, true);
    openDialog.show();

    if (openDialog.fileName != "") {
      model = (Classifier) Debug.loadFromFile(openDialog.fileName);
      if (model != null) {
        jTextArea1.append("Model loaded: ");
        jTextArea1.append(openDialog.fileName);
        jTextArea1.append("\n");
        jButton6.setEnabled(true);
      } else {
        jTextArea1.append("Invalid Model: ");
        jTextArea1.append(openDialog.fileName);
        jTextArea1.append("\n");
      }
    }
  } // GEN-LAST:event_jButton5ActionPerformed