How to add element to existing JList
Part of my code ArrayList<Item> i = g.getItems(); Vector itemsVector = new Vector(i); JList items = new JList(iemsVector); Later in the code I create new object which I want to add to JList. How can I do that? Populate the JList with a DefaultListModel, not a vector, and have the model visible in the class. Then simply call addElement on the list model to add items to it. You may add it ( new object ) to the itemsVector (Vector). After adding an item into Vector object invoke the items.setListData(itemsVector); method. Well you can not use directly that Array but use this this will might help