Java – want a way to highlight textares specific words?

Hi, I'm looking for a way to highlight specific words in text, such as how text editors use syntax highlighting Highlighting will include text in different colors and / or styles, such as italic, bold or general

In order to narrow the focus, how to use Java Swing components to achieve this goal

It is most likely to use multiple methods to deal with multiple highlighted words and large amounts of text

Any feedback is appreciated thank you.

Solution

Look at Java's jeditorpane class: it can meet your needs

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>