Why do I sometimes get blank JLists after updating contents through the list model?
问题 I have a recurring problem where I have a JList which I wish to update with new contents. I'm using a DefaultListModel which provides methods for adding new content to the list but when using these methods I find that some proportion of the calls result in a completely blank JList. Whether or not the update works seems to be random, and not related to the data which is sent. Below is a simple program which demonstrates the problem. It simply generates a list of an increasing size to update a