How do I find and highlight the first instance of a word in a notepad Java app?

Lina S

New member
I have created a notepad application in Java, but I have no idea on how can I add a find tool which will only highlight the first instance of the wanted word.

Please don't tell me about the TextFieldDemo in oracle's website, as what I'm looking for is more something like that: http://tech.chitgoks.com/2010/12/03/highlight-matches-in-jtextpane/ (that's not working and the code is really long and hard for me to understand!)
Please I really need help!
 
Back
Top