How to make a red zig zag under word in JEditorPane

前端 未结 3 1792
有刺的猬
有刺的猬 2021-01-03 13:31

I need to make a simple spell checker in Java for an application that I am creating and I have searched around and have not found any straight and to the point answers.

3条回答
  •  耶瑟儿~
    2021-01-03 13:57

    You may find this custom editor kit example useful. It shows how to extend StyledEditorKit to add attribute to draw custom underline.

    If you're up for a complete solution you can go with Jide's StyledLabel. Check it out here. It should be part of jide-oss - common open source library.

提交回复
热议问题