private void btnLearnCompleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLearnCompleteActionPerformed

        ScienceTool.clearAll();
        while (lstTypes.getSelectedIndex() < lstTypes.getModel().getSize() - 1) {
            System.out.println("learning " + txtFile.getText());
            File file = new File("data/" + txtFile.getText());

            if (file.exists()) {
                for (LinkKNN knn : knns) {
                    knn.learnType((String) lstTypes.getSelectedValue());
                }
                Datasource.getInstance().playRecording(file);
                for (LinkKNN knn : knns) {
                    knn.stopLearning();
                }
            }
            //Switches the Gui
            if (lstTypes.getSelectedIndex() < lstTypes.getModel().getSize()) {
                lstTypes.setSelectedIndex(lstTypes.getSelectedIndex() + 1);

            }
        }
        jlDatas.updateUI();
        jlDatas.setSelectionInterval(0, jlDatas.getModel().getSize());
    }//GEN-LAST:event_btnLearnCompleteActionPerformed