i am trying to add ArrayList to Jlist, but the only way that I given to understand is that to write the code like this :
ArrayList labels = new Arr
JList has no constructor that accepts a List. The first example works as it uses the constructor JList(Object[]).
JList
List
Familiarize yourself with the javadoc