Weird swing/JPanel problem!

I’m have a very strange bug within my program and can’t seem to trace it.

When I run my sudoku puzzle game nothing is displayed in the JFrame, but as soon as I resize the JFrame the puzzle and all Swing elements ‘pop’ or appear into the frame.

Also when I minimize/maximize the frame, the problem is rectified. (Where’s the emoticon of the guy hitting himself in the head with a hammer?)

Has anyone ever experienced this sort of swing bug?

By nothing, you mean white screen or swing default color?

No. Very unlikely to be a Swingbug.
More information required, I’d say.

Sounds like a regular case of adding stuff after making the window visible. Try calling “revalidate()” on the JFrame.

Sorry, I didn’t mean like an actual Swing bug, just a general code bug while using the swing library.

Using the revalidate() method solved the problem, thanks for the replies guys, much appreciated! ;D