static JTextPane showLineCompedSingleLevelsAsColoredText_v2(LineCompedSingle lc) { // each matrix element is the symbol starting position for the character+1 (or 0 for empty) int[][] rows = renderLineCompedSingleLevels_raw_v2(lc); S text = uncompressLineCompedSingle(lc); printVars(+rows); int n = l(first(rows)); new L out; forEach(rows, row -> { var color = Color.white; out.add(color); var lastSymbol = 0; for i to n: { if (row[i] == 0) { if (color != Color.white) out.add(color = Color.white); lastSymbol = 0; out.add(' '); } else { if (row[i] != lastSymbol) { color = color == Color.yellow ? Color.blue : Color.yellow; out.add(color); lastSymbol = row[i]; } out.add(text.charAt(i)); } } out.add("\n"); }); ret withTypeWriterFont(showColoredText(out)); }