*
The moose likes Swing / AWT / SWT and the fly likes DefaultListModel and event dispatch thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "DefaultListModel and event dispatch thread" Watch "DefaultListModel and event dispatch thread" New topic
Author

DefaultListModel and event dispatch thread

Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

should you update list models in the event dispatch thread?

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19674
    
  18

Definitely. Otherwise you can get nasty ArrayIndexOutOfBoundsExceptions and the like.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

i was getting them, pretty nasty
 
Don't get me started about those stupid light bulbs.
 
subject: DefaultListModel and event dispatch thread