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
Because JList doesn't have a constructor that accepts an ArrayList (or a List). It can only accept an array, a ListModel, or a Vector. See the documentation.
JList
ArrayList
List
ListModel
Vector
An ArrayList is not an array. You can't pass an ArrayList to a method that wants an array.