I'm trying to insert a linked list into a text area. Here is what I'm
trying with:
for(int i = 0; i < theDirectory.size(); i++) {
listArea.append(theDirectory.get(i));
}
theDirectory is a linked list of type String.
It's not working too well. I would appreciate some pointers...
kaltizer - 24 Sep 2007 12:32 GMT
> I'm trying to insert a linked list into a text area. Here is what I'm
> trying with:
[quoted text clipped - 7 lines]
>
> It's not working too well. I would appreciate some pointers...
Please disregard this posting. It works.
Roedy Green - 24 Sep 2007 20:00 GMT
>theDirectory is a linked list of type String.
Perhaps it is not. Show us your declaration code.
It should look something like this:
import java.util.LinkedList;
...
LinkedList<String> theDirectory = new LinkedList<String>( 100 );
I would expect you would want to append some sort of separator between
the strings, e.g. '\n'\ or ' ' .
"It's not working too well.".
That is rather vague. What is the compile or run time error message
you are getting? What is the unexpected behaviour?
Ideally you show a tiny complete computer program that others can run
to track problems. What you are doing is like going to the doctor's
wearing a saying a hijab saying "I'm sick. What's the matter with me?
I won't disrobe and I'm allergic to blood tests".

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com