code: private void _updateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__updateActionPerformed
          jTextPane1.setText("");
          String text = new String(buffer, 0, pos);
          String[] lines = text.split("\n");
  
          Style style = jTextPane1.getStyle("INFO");
          for (String line : lines) {
              if (line.startsWith("o ")) {
                  line = line.substring(2);
                  style = jTextPane1.getStyle("OUTPUT");
              } else if (line.startsWith("i ")) {
                  line = line.substring(2);
                  style = jTextPane1.getStyle("INFO");
              } else if (line.startsWith("w ")) {
                  line = line.substring(2);
                  style = jTextPane1.getStyle("WARN");
              } else if (line.startsWith("e ")) {
                  line = line.substring(2);
                  style = jTextPane1.getStyle("ERROR");
              }
  
              try {
                  jTextPane1.getDocument().insertString(jTextPane1.getDocument().getLength(), line + "\n", style);
                  jTextPane1.setCaretPosition(jTextPane1.getDocument().getLength());
              } catch (Exception e) {
                   Log.Err.println(e.getMessage());
              }
          }
      }
docs: GEN-LAST:event__saveActionPerformed