wood burning stoves 2.0*
The moose likes Java in General and the fly likes Repaint method not working from button call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Repaint method not working from button call" Watch "Repaint method not working from button call" New topic
Author

Repaint method not working from button call

Sam Nassiri
Greenhorn

Joined: Jun 01, 2010
Posts: 9
Dear all,

I have constructed a button that when pressed calls a method to repaint a JFrame. The repaint is called from a method called refresh, which is placed inside a for loop. The intended result is that the JFrame is refreshed at the end of each loop, i.e. 5 times if x is equal to 5. Unfortunately the repaint only happens at the end of the for loop, and only one change is observed. Below is the code.






The repaint() method is contained within thisSession.refresh().

Many Thanks
Sam
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Repaint method not working from button call
 
Similar Threads
Multithreading: bouncing balls problem
no static??
Repaint method not working from button call
Something wrong with my paint() method
repaint()????