I am using the LanguageTool in a desktop java application that I created. It gets the text from an imported file in a JTextArea and it checks for errors fine but how do I get it to show the highlighting of the errors? (Red: spelling error, Yellow: grammar error)
I prepared a small demo. You can download it from the following URL
The project has two maven modules. The languagetool-wrapper module contains the needed classes for adding highlighting to a JTextComponent. The languagetool-wrapper-demo module contains code that creates a Window with a JTextArea. The last two lines in the constructor are responsible for adding grammar checking to the textarea.