| | |
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 |
actuate android api applet application applications array arrays automation balls bank binary bluetooth business chat class classes clear client code codesnippet collections component coordinates database defaultmethod development dice dragging ebook eclipse educational error exception formatingtextintooltipjava fractal game givemetehcodez graphics gui hql html ide image infinite ingres input integer invokingapacheantprogrammatically j2me java javaprojects jni jpanel jtextarea julia linux list loop looping map method methods mobile mysql netbeans newbie openjavafx parameter php print problem program programming project recursion repositories scanner screen scrollbar server set size sms sort sorting sql sqlserver state storm string sun superclass swing swt text-file threads tree websites windows





