Starnge swing problem
Hello guys,
I don't really need a solution, just answer - some Swing insight. So I have a panel, and a list on it. The list is populated with strings. The problem is the following: If I add the list elements too fast, I end up with different kinds of strange windows. However, after introducing a sleep(100), or another function call, it surprisingly works fine. I didn't believe this was the problem, so I added and removed the sleep several times. It solved the glitch 10/10.
How? Why? Ideas and guessings are welcome as well.
Thanks in advance,
Chaster
Chaster
Junior Poster in Training
68 posts since Jun 2007
Reputation Points: 12
Solved Threads: 3
Swing lib use threading to Draw as you may knew , can you please post the code .
It's kind of confidential. I just hoped someone came across the same issue ;). Actually it's nothing special about the code. It's not multi-threaded, I just add several entries to the list.
Chaster
Junior Poster in Training
68 posts since Jun 2007
Reputation Points: 12
Solved Threads: 3
1.What about model of JList?
2.Forced repaint() method?
1.) Default
2.) Repainted after each update
Chaster
Junior Poster in Training
68 posts since Jun 2007
Reputation Points: 12
Solved Threads: 3