Hi, i am developing code for an editor like tool. as we work in some IDE`S like eclipse or netbeans or even any editor like edit plus or notepad++ etc. whenever we write any keyword for specified language that keyword changes it`s attributes eg change in color etc.. i`ve tried my best to do that but it`s not working....
here is the code for that stuff .. actually m is an object for frame and t is JTextPane associated with it
it changes the color of selected text but after updating caret the text changes again it`s color..
if you will try this code in a frame after changing some code it will show you what`s happening ...
now i do need a solution for this problem please help me...