i want to search in a text pane for a word and if i find it i highlight it (select it ) i thought about extractiong the words into an array and check them one by one BUT i dont know how to made them higlighted after finding the required word anyhelp
Highlight.. Can you not change the font/color for the selected text ?
SCJP 1.4 (90%)<br />SCWCD 1.4 (88%)
posted 12 years ago
still can not do it help!!
How can I help you? You haven't told me what you have tried and what has failed. I gave you the name of the method calls. Did you try them? Did the code compile? Did act as expected? Did it do as you wanted? Help me to help you.
Swati Udas: Yes, you can change at least the colour IIRC. There is a method in the JTextPane class (or one of its superclasses) to do that. Check out the API docs - always a very useful item to have a hand.
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad: