This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Repaint not working inside actionperformed!! need help please .

 
mars anem
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the code of my program, I don't know what is the problem. I would really appreciate the help. thank you :-)




mapaZac.jpg
image of background
[Thumbnail for mapaZac.jpg]
play.jpg
image for button
[Thumbnail for play.jpg]
 
pete stein
Bartender
Posts: 1561
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello mars, and welcome to JavaRanch! I've taken the liberty of editing your post and adding code tags so that the code will retain its formatting and be readable. To learn how to do this yourself, please check out the FAQ section including HowToAskQuestionsOnJavaRanch and UseCodeTags.

Much luck and again, welcome!
 
mars anem
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much, I will read about code tags :-)
 
Rob Spoor
Sheriff
Pie
Posts: 20388
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Concurrency in Swing. In other words, the repaint will be done - as soon as the run method ends.
 
Mark E Hansen
Ranch Hand
Posts: 650
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, realize that the code executing in the main method is not in the Event Dispatch thread (EDT).
You really shouldn't do any Swing work outside of the EDT. The article referenced by Rob is a great place to read about this and how to do it properly.
 
mars anem
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you both, I will read the article on concurrence in swing .
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic