public static void appendError(String message) {
        try {
            console.append(message + NEWLINE);
            
            int pos = console.getText().lastIndexOf(message);
            console.getHighlighter().addHighlight(pos,
                    pos + message.length(),
                    new DefaultHighlighter.DefaultHighlightPainter(RED));
            
            scrollToBottom();
            
        } catch (BadLocationException ex) {
            System.out.println(ex.getMessage());
        }
    }