File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Trouble with JEditorPane changing colors with styles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Trouble with JEditorPane changing colors with styles" Watch "Trouble with JEditorPane changing colors with styles" New topic
Author

Trouble with JEditorPane changing colors with styles

Magno Ritzmann
Greenhorn

Joined: Jun 28, 2012
Posts: 3
I'm using Styles to change the color of my reserved words, but it´s changing incorrectly, it´s changing right when I type in the first line but in the next lines only part of the word is changed, what is wrong with my code??

the problem!


Uploaded with ImageShack.us


this is the code ->



Thanks for any help!
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

Learn about Text and New Lines from Rob Camick.


luck, db
There are no new questions, but there may be new answers.
Magno Ritzmann
Greenhorn

Joined: Jun 28, 2012
Posts: 3
Thanks, it worked completely!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Trouble with JEditorPane changing colors with styles
 
Similar Threads
change text color of highlighter
Highlighting Text in JTextPane is SUPER SLOW!!
Text in different colours
JTextPane: Identifying Comment Lines
HTML text on SWING components