I have a JList initialized with a vector of objects. I want the JList to display a specific variable from each object in question, but so far it displays the class name and some seemingly random letters and numbers.

i.e. Object@d4g3s3

I've been reading all morning and can't find an example for how to make it present a variable from the object instead.

Can someone point me in the right direction?

03-21-2009, 02:03 PM

Fubarable

What is the toString() method for the objects in the arraylist (I think I already know the answer to this)?

03-21-2009, 02:03 PM

logicbug

Figured it out. Turns out JLists return the value of the objects toString Method. Just had to write one for my object.

03-21-2009, 02:05 PM

Fubarable

good deal. How did you figure this out? my post, or another forum?

03-21-2009, 03:28 PM

logicbug

A Sun SDN Article actually, looks like we were both typing our messages at the same time.