I have a quick JList question...
This is mostly for curiosity and simplicity.I have been told that I can populate a Jlist of a custom class with a specific variable from that class without using a model or creating another array for that specific encapsulated variable.
For example:
I have a class called PhoneBook. That class has multiple private variables like name, phone, city, address, etc. The way I would usually populate a JList would be by either creating and adding to a model or making a new array and using that classes accessors to get, for example, the names and then using that array in the constructor.
My question is: Is there a way to just populate a JList without doing a model or creating an array but directly with a constructor call.
So I would just have for example something like this(I know this code doesn't work... just what im thinking)
PhoneBook array =/*data from buffer */
list =new JList(array.getName())
...and it would get those names for me for the JList. Ive searched and looked around and now I have a headache and was hoping someone has some experience with this.
Thank you.

