private void pattern_Button1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pattern_Button1ActionPerformed
        try {
            PrintWriter writer = new PrintWriter(this.jTextField_Parser.getText().substring(0, this.jTextField_Parser.getText().length() - 3) + "jsca", "UTF-8");
            for (int j = 0; j < games.size(); j++) {
                Game g = games.get(j);
                if (g == null) {
                    continue;
                }
                String str = g.toString();
                int last = 0;
                for (int i = 0; i < str.length(); i++) {
                    try {
                        if (str.substring(i, i + 1).equals("]") && !str.substring(i, i + 3).equals("] ]")) {
                            writer.println(str.substring(last, i + 1));
                            last = i + 1;
                        }
                    } catch (java.lang.StringIndexOutOfBoundsException ex) {
                        if (str.substring(i, i + 1).equals("]")) {
                            writer.println(str.substring(last, i + 1));
                            last = i + 1;
                        }
                    }
                }
                writer.println();
            }
            writer.close();
        } catch (FileNotFoundException ex) {
            Logger.getLogger(GraphicalViewer.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(GraphicalViewer.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_pattern_Button1ActionPerformed