Joe Cole
Posts: 3
Nickname: joecole
Registered: May, 2003
|
|
Re: JList
|
Posted: May 25, 2003 5:19 PM
|
|
You have obviously put some object into the array which does not have its toString() method overridden.
To change this overrirde the toString method
public String toString(){ return new String("Name:"+ name + " somethingelse " + somehtingelse); }
The funny characters you see are the object@instance names. You can see how this is done in the source of object.java
Or, you could create a new listcellrenderer which determines how to show it, but thats harder.
See ListCellRenderer if you want to do this.
|
|