Detecting selected text change in a JTextArea

  • Follow


I would like to detect any selected text change in a JTextArea, wetherthe selection changed using the mouse button or the shift+arrow keys.Is there a way to detect that?CJ
0
Reply cjaouhar (5) 10/11/2007 5:22:25 PM

cjaouhar@hotmail.com wrote:
> I would like to detect any selected text change in a JTextArea, wether
> the selection changed using the mouse button or the shift+arrow keys.
> Is there a way to detect that?
> 
> CJ
> 

I don't know for sure but here is what I would try first;

Add a CaretListener to the JTextArea and check for a change in the 
selected area.

-- 

Knute Johnson
email s/nospam/knute/
0
Reply nospam8071 (916) 10/11/2007 6:12:24 PM


1 Replies
296 Views

(page loaded in 0.122 seconds)

Similiar Articles:













7/25/2012 9:53:24 PM


Reply: