| | |
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 |
2dgraphics android api apple applet application arguments array arrays automation banking binary binarytree bluetooth capture chat chatprogramusingobjects class classes client code color component count database derby design eclipse eclipsedevelopment encryption error event exception fractal game givemetehcodez graphics gridlayout gui html ide if_statement image input integer interface j2me java javadesktopapplications javaprojects jlabel jni jpanel julia keyword linux list loop macintosh map method methods midlethttpconnection mobile netbeans newbie object os print printing problem producer program programming project projectideas read recursion reference replaysolutions ria scanner screen server set size sms sort sourcelabs sql stop string swing threads transforms tree ui unicode validation windows





