GeeCON Prague 2014*
The moose likes Swing / AWT / SWT and the fly likes Repaint not working inside actionperformed!! need help please . Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Repaint not working inside actionperformed!! need help please ." Watch "Repaint not working inside actionperformed!! need help please ." New topic
Author

Repaint not working inside actionperformed!! need help please .

mars anem
Greenhorn

Joined: Jun 12, 2010
Posts: 3
Here is the code of my program, I don't know what is the problem. I would really appreciate the help. thank you :-)







[Thumbnail for mapaZac.jpg]


[Thumbnail for play.jpg]

pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
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

Joined: Jun 12, 2010
Posts: 3
Thank you very much, I will read about code tags :-)
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Concurrency in Swing. In other words, the repaint will be done - as soon as the run method ends.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 643
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

Joined: Jun 12, 2010
Posts: 3
Thank you both, I will read the article on concurrence in swing .
 
GeeCON Prague 2014
 
subject: Repaint not working inside actionperformed!! need help please .