Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to color a particular word in jtextpane ?

 
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
i m making a text editor in that when ever user type a certain java keyword like void just that word will be appeared as blue and rest other work should be red
i m using keylistener but unfortunately my logic is notworking here
what is happening here is when i write some thing like
class void then i press enter then the color of the text changes to red and from then on the entire text is written in red color
same is the case with blue ....so please can you tell me where i m wrong and what is key thing in this which i m missing ?
if you can provide some example than that would be great help because in the google every code is not understandable
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
This is still the same problem as this one. UseOneThreadPerQuestion.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic