0

I am having a little trouble here, I want to convert a text area into a string, so i can store it in a new string and pass it to a txt file. Here is my code:

// ta is my textArea, things is a String

things = ta.toString();
outputFile.println(things);
closeFile();

But when i do this it is literally taking everything about the textArea and putting it into a string. I just want to put the text into a string, not all the values of the textArea. Any suggestions?

2

1 Answer 1

2

You need to use something like this:

things = ta.getText();
outputFile.println(things);
closeFile();
Sign up to request clarification or add additional context in comments.

1 Comment

Actually, he needs to learn to read the documentation before firing off basic questions. IMHO ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.