View Single Post
  #1 (permalink)  
Old 08-09-2007, 09:26 PM
jkhoa jkhoa is offline
Member
 
Join Date: Aug 2007
Posts: 3
jkhoa is on a distinguished road
Preventing inserted text from becoming colored from previous style
I have a jtextpane I have alreadly colored in black, and red. Red is for the text inside the brackets. This seems to work, but the problem is when I insert text imediately next to a red bracket, the next text that comes out is red as well, while it should be black. Right now what I'm doing to fix the problem is coloring everything black first then color in the red, but that makes the jtextpane blinks between two colors. I was wondering if there is some simpler way to prevent the style from being "contagious".

thanks in advance.
Reply With Quote
Sponsored Links