| | |
Starnge swing problem
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2007
Posts: 59
Reputation:
Solved Threads: 3
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
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
Last edited by Chaster; Sep 7th, 2009 at 2:31 pm.
Swing lib use threading to Draw as you may knew , can you please post the code .
Just walk beside me and be my friend
Programming forums,phpbb3 Styles,
Java Forums,Web Development Forums
Programming forums,phpbb3 Styles,
Java Forums,Web Development Forums
•
•
Join Date: Jun 2007
Posts: 59
Reputation:
Solved Threads: 3
•
•
•
•
Swing lib use threading to Draw as you may knew , can you please post the code .
. Actually it's nothing special about the code. It's not multi-threaded, I just add several entries to the list. ![]() |
Similar Threads
- html rendering or parsing (swing) problem (Java)
- Java Swing Problem - won't repaint (Java)
- Problem in Timer thread (Java)
- Swing Problem (Java)
- Aurora and more (Viruses, Spyware and other Nasties)
Other Threads in the Java Forum
- Previous Thread: Newbie need help with threading
- Next Thread: Java beginner
| Thread Tools | Search this Thread |
android api applet application array arrays automation awt bidirectional binary birt bluetooth busy_handler(null) calculator chat class classes client code columns component constructor database designadrawingapplicationusingjavajslider draw eclipse editor error errors event eventlistener exception expand fractal game givemetehcodez graphics gui guidancer html ide image inetaddress input integer intellij j2me java javamicroeditionuseofmotionsensor javaprojects jme jni jpanel jtree julia link linux list loop map method methods mobile mobiledevelopmentcreatejar myaggfun netbeans newbie oracle parsing plazmic print problem program programming project recursion scanner screen server set sharepoint size smart sms smsspam sort sortedmaps sql string subclass support swing textfield threads time tree unlimited utility webservices windows





