Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JList + JScrollPane Prob (URGENT..)

Yaroslav Chinskiy
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have JList with ScrollPane
For JList I use DefaultListModel
If I pump a lot of messages to the list (at the same time i send 300 x 3 thread), I sometimes get ArrayOutOfBound exception or my ScrollPane freezes until the new message is added.
I add messages using mulithread, the add method is synchronied.

Do you know how to fix it???
Also i want to add counter that whould display num of messages in the JList, it should inc ar dec whenever new messege is added or deleted?
Thank you.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic