Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems with Threads in an Applet

jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Homework problem here, I'm creating an applet that draws 5 random lines on the applet. That's easy enough, got it all working good. However, just to challenge myself, I'm going beyond what the assignment wants and I decided to add a thread in here that will draw one line, sleep for a second, then draw another, etc. Thought it would "look" better than just the 5 lines all at once.
Anyway, when I added the thread part to the program, I no longer get any lines being drawn. I added some print statements that tell me where I am in my program, and it seems to be going through everything like it should, I'm just not getting anything printed out. I've used threads before in this same sort of context, but I can't seem to see why this wouldn't be working.
Any pointers would be great, don't worry about posting code
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!