The inclusion of "helper" constructors was meant to make it easier to use the JList with simple data structures.
The JList (and many Swing components) are actually meant to be used with models that supply the actual data to the view.
The original design goes way back before Swing was incorporated into the main library (prior to JDK 1.3) and just before the collections API was introduced, so it's likely that the original developers didn't have List available to them (hence the inclusion of Vector).
It's likely that no one has seen fit to update the libraries since (partially because it may have been decided that the original constructors shouldn't have been included, but I wasn't at that meeting ;))
A better/simpler solution would be to create your own model that uses the List as it's data source.
For example...
public class MyListModel<T> extends AbstractListModel<T> {
private List<T> people;
public MyListModel(List<T> people) {
this.people = people;
}
@Override
public int getSize() {
return people.size();
}
@Override
public T getElementAt(int index) {
return people.get(index);
}
}
Then you can simply supply it to the JList when ever you need to...
JList myList = new JList(new MyListModel<MyObject>(listOfMyObjets));
"Whats confusing me is that, why i cannot just add ArrayList to Jlist directly like this:"--- Because we can't just make up code and hope that it might work. The API will tell you exactly what constructors and methods are available. The more you use it the more useful it will become.ListModelthat uses theListas it's core backing data...