Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JTextPane selection color problem

843806Oct 24 2008 — edited Oct 24 2008
I 've createa a simple editor by using jtextpane, but i have a problem about the selection color :

when i drag the mouse to select some text in the textpane, the selection color is blue (see figure below)

http://i35.photobucket.com/albums/d186/bobbi2004/1.gif

and then i change the style, bold for example, but the selection color becomes transparent (although there is still a selection there.)
http://i35.photobucket.com/albums/d186/bobbi2004/2-1.gif

i have seen some example about jtextpane but there was no problem, but i can't figure it out why.
thanks for helping me.

ps : this is the NetBeans source files for this editor.
http://www.mediafire.com/?iukjmvj5mwn


thanks again, and sorry for my bad english

Edited by: bobbi2004 on Oct 24, 2008 12:21 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2008
Added on Oct 24 2008
3 comments
306 views