static JTextPane ai_tokenizationToTextPane(LS tok) { JTextPane tp = fontSizePlus(7, jtextpane()); bool spaced = true; for i over tok: { if (!spaced) { appendToTextPane(tp, " "); spaced = true; } S t = tok.get(i); if (empty(t)) continue; SimpleAttributeSet style; if (odd(i)) // C token style = style_background(Color.lightGray, style_foreground(Color.black)); else // N token (whitespace) style = style_strikeThrough(style_foreground(Color.gray)); appendToTextPane(tp, t, style); spaced = false; } ret tp; }