Thanks
I checked the same with other GUI applications like the textareas in Outlook ,
Word etc.
They behave in the same manner.So this must be a standard GUI feature.Sorry for
bothering you all.
-----Original Message-----
From: Bill Tschumy [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 7:08 PM
To: Pradeep, Chinnaswamiah; [EMAIL PROTECTED]
Cc: Praveen Kumar, Irrinki
Subject: Re: JTextArea problem.
Using the select() method is just the same as if the user selected
text with the mouse. In that case hitting Enter should replace the
selected text with a carriage return. If you are using select() to
highlight an area of text and don't want the text affected by editing
commands, consider using a highlighter. It has been a while since I
used Highlighter, but it worked very well for just this purpose.
At 6:47 PM +0530 7/16/01, Pradeep, Chinnaswamiah wrote:
>Hi ,
>
> I came across a strange problem in JTextArea.Select a portion of text in a
>JTextArea and press the 'ENTER' (RETURN) key. The selected portion of the text
>disappears. Is this a feature of JTextArea or a bug. How do you ignore this
>feature?
>Adding a keyListener or adding the ENTER key in the actionMap might prove
>costly.
>
>Thanks
>Pradeep
>_______________________________________________
>Advanced-swing mailing list
>[EMAIL PROTECTED]
>http://eos.dk/mailman/listinfo/advanced-swing
--
Bill Tschumy
Otherwise -- Austin, TX
[EMAIL PROTECTED]
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing