How to change highlighting color in Java Swing TextArea? And also, change the beginning of text corresponding to the highlighting location

You can achieve this, though not directly, since you have to save the reference to the Highlight that you had added to the said line, hence you have to traverse through all the Highlights to remove the one you want, have a look at the program attached, might be this will help you to attain … Read more