Do you mean that you lose the selection with every move of the caret resulted from an arrow keypress? Could you provide a link to a example of what you are trying to do (a small applet, a collection of screenshots, or a jar file of a sample application)?
Regards Dmitry At 04:24 AM 1/16/2002, Ravyts, Sofie wrote: >I have another problem with highlighting in a textcomponent( a JTextPane) > >I catch the caretupdate event to select parts of my text when the user >selects a character (the text contains of collections of characters instead >of separate characters... So if a character is selected i want to select all >the characters in the collection of the selected character.) >The problem is that i can get it to work with the mouse, but not with the >arrows on the keyboard. The background selection color with the arrows turns >white instead of the blue i set it to (with setSelectionColor()). >When i do the same thing with the mouse, it works fine (a blue background >color!)... _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing