posted 19 years ago
hi, I have a JList and I use a DefaultListModel to store the list entries.
I have a button on that panel. When the button is clicked, I remove all the entries from DefaultListModel and add all entries back from a sql query result.(I have to do it that way)
My problem is, after I did the operation on my DefaultListModel above, the content of JList doesn't change(the database has been changed), however, sometimes it works.(some times not) I'm wondering that do I need to call a sort of refresh method on JList after I make changes on the ListModel.
If someone can help, that will be great.