I want to set color for specific lines in the text area. What I\'ve found so far, is the following
// Declarations private final DefaultStyledDocument document;
Create a custom swing document extending for example PlainDocument and have a custom HighlightedView which is responsible for painting tokens.