https://i.stack.imgur.com/8rQW1.png
JScrollPane scrollPane_4 = new JScrollPane();
scrollPane_4.setViewportView(list_4);
final JList list_4 = new JList(modelItems);
list_4.setBounds(428, 39, 294, 187);
JButton btnNewButton_4 = new JButton("Refresh");
btnNewButton_4.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
modelItems.clear();
arrayOfItems.clear();
for(RSItem d : Inventory.getAll())
{
arrayOfItems.add(d);
modelItems.addElement("Item: "+d.getID()+" at spot: "+(d.getIndex()+1));
}
}
});
I am not sure what is causing this to happen. I have many other JLists with almost the exact same code and this does not occur.