Re: Text Area Help
tom79l@googlemail.com wrote:
Ok, I did as you mentioned and I got the text from the field using
textArea.getSelectedText() //(or is it just textArea.getText)
But I don't quite understand what you mean by using a
String.substring(), is this where i'm supposed to
use .getSelectionStart() etc?
Yes. Are you familiar with the JavaDocs?
Check the substring method of the String class
for more details on 'cutting out' the first and last
parts of the String.
Ive also tried using a replaceText() but I got too many errors (red
lines) ..
I trimmed your reference to NetBeans earlier,
because if you know Java, it is not necessary
to mention IDE's, and if you don't know Java,
you need to learn Java.
For that reason, I will point out that while I don't
know (nor especially care) exactly how NetBeans
uses 'red lines', I am guessing they are compilation
errors. When discussing compilation errors, it is
always best to copy paste the text of the error.
<http://www.physci.org/codes/javafaq.html#exact>
...and I didn't know how to ammend it.
Telling us exactly what error the code is generating,
would be a good first step to allowing us to help you
amend the code.
..
Like I say I am new to this and if this is something simple to you, I
thank you in taking time in helping me along.
(wry grin) Does that mean if this is *hard* for
me, I get *no* thanks? ;-)
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-setup/200704/1