Jlist to Jtextarea

I need some help getting the selected values from a Jlist into a Jtextarea, one value per line. I've been trying to use the getSelectedValues() method, but my program crashes when i initiate the process with my button

I've successfully used the getSelectedValue() method to get the first selected value and display it, but for some reason when using the getSelectedValues() method, I can't effectively take the object array created and put it into the textarea.

So frustrated, and theres probably a way to do it thats sooo easy out there that makes it that much more frustrating.

[601 byte] By [117mCa] at [2007-11-26 17:15:35]
# 1
> and theres probably a way to do it thats sooo easy out therebut the problem is not 'out there', it is in your code which is still a secret.
Michael_Dunna at 2007-7-8 23:43:36 > top of Java-index,Java Essentials,Java Programming...
# 2

In the future, Swing related questions should be posted in the Swing forum.

> when using the getSelectedValues() method, I can't effectively take the object array created and put it into the textarea.

That would be because you don't place the array in the text area. You need to add the toString() representation of each Object to the text area individually.

If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program[/url] (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.

And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags[/url] so the code retains its original formatting.

camickra at 2007-7-8 23:43:36 > top of Java-index,Java Essentials,Java Programming...