You should not be updating the Vector. Changes should be made directly to the ListModel then the table will repaint itself automatically.
If you decide to recreate the ListModel because of the changes to the Vector, then you update the list by doing:
list.setModel( theNewModel );
Edit: Forget the Vector and load the data directly into the DefaultListModel:
DefaultListModel model = new DefaultListModel();
model.addElement( "one" );
model.addElement( "two" );
JList list = new JList( model );
Now whenever you need to change the data you update the model directly using the addElement(), removeElement() or set() methods. The list will automatically be repainted.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…