This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programming Diversions and the fly likes java code problem? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Other » Programming Diversions
Reply locked New topic
Author

java code problem?

vikky agrawal
Ranch Hand

Joined: Dec 18, 2008
Posts: 65
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...


scjp 6
http://algorithmsea.blogspot.com
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41033
    
  43
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.


Ping & DNS - my free Android networking tools app
 
jQuery in Action, 2nd edition
 
subject: java code problem?
 
Similar Threads
wriring code for an EDITOR big problem??
how to paint a particular word in a string ?
Nested Layout Managers?
Saving with JTextPane & Attributes handling
replacing characters in rtfeditorkit