The DefaultCaret turns the visibility of the current selection off when the component loses permanent focus. See my post "Re: Selections in JTextArea" dated 8/30/2000 for a possible work-around.
Dmitry At 08:30 AM 1/14/2002, you wrote: >The problem is: > >I highlight text in the text component with a mouse. >Click on the button. Because the focus is no longer on the text component, >the selection/highlight disappears. However, the call to the >component.getSelectedText() will still return the selection correctly. How >can I, if possible, have the text marked as selected even though the focus >is lost? > >Thanks. _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
