Showing posts with label how. Show all posts
Showing posts with label how. Show all posts

Sunday, September 4, 2011

Hmmm

I wonder how long it takes Google to index something.

Oh, here's a really cool pic by nightgrowler I found on the internet:

Saturday, May 7, 2011

Best way to refresh a JFrame (or other such container) in Java

Call the following two methods (in this order):
invalidate();
validate();



if your class is a subclass of the container (i.e. if YourClass extends JFrame, etc)
you could perhaps create a method redraw consisting of those two methods and call it whenever you want to refresh the screen.

else, you can just call the methods from the instance of the JContainer object.
eg.
frameName.invalidate();
frameName.validate();