Getting single strings from a text area

I'm try to use a textarea(JTextArea or JPaneArea) where I can appended strings, and then have the user enter a number, say like 5, and it gets the 5th string entered in that text area. Yet when I use getText, the whole text are as a string is returned to me.

Is there anything that enter strings like an array in a textarea in which what I am trying to do will work?

[380 byte] By [blackmagea] at [2007-11-27 4:52:35]
# 1
That's like asking to get the fifth cup of water dumped into a bucket.Don't use a single text component if you want to keep things separate. Use something which can keep things separate. Like maybe a JList.
DrClapa at 2007-7-12 10:06:38 > top of Java-index,Java Essentials,New To Java...
# 2

But at the same time, I wanted to use a search method. Like one similiar to your browswer where you type in characters and it automatically reduces the availabe options. Thats why I want to be able to read each string, compare characters, and if they don't match up, make it invislbe. Is that possible with JList?

blackmagea at 2007-7-12 10:06:38 > top of Java-index,Java Essentials,New To Java...
# 3
Well, sure. People ask about auto-completion in this context all the time in the Swing forum.
DrClapa at 2007-7-12 10:06:38 > top of Java-index,Java Essentials,New To Java...