Highlight text

Hi guys,
I need to highlight a word in text document when i keep cursor on that word. am doing it in java with netbeans ide. please help me by giving code. thanks.