• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Timer Problems

 
jack pashley
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a zombie apocalypse simulator that I've been making. I'm having problems with making the text come up slow enough in my JTextArea (resultField) so that you can see it. All the program has to do is hold a loop still four about a second to half a second so you can read the variables as it increments. I have tried using Thread.sleep(500); but that just makes the GUI freeze for 500 seconds. So what i need the most is someone to help me set up a timer because I've looked all over the internet and none of the tutorials work for what I need (some of them didn't even work at all)

Loop where the code needs to go

 
Greg Brannon
Bartender
Posts: 563
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put this project down for a sec and write a simple container with a text box that adds text driven by a javax.swing.Timer. Get it started and come back when you need help.
 
jack pashley
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No it did not work

 
Paul Clapham
Sheriff
Posts: 21111
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Didn't work? All went wrong? Yes, it's frustrating when a little thing like a semicolon torpedos your code, but for us to help you we need you to TellTheDetails. And read ItDoesntWorkIsUseless for more information. (Those are links; follow them.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic