This is a really strange bug...

I'm doing a 'game' of sorts for Computer Science, and it works wonderfully. We have a main method that initializes things and starts the game loop. The game itself works when is executed.

Every method call in the main method is static.

Now, the odd thing is that when that exact same code (copy and paste) is run from a different class, and either executed statically, or even when creating a new object and using that as a reference, both JFrames show up as necessary, but they are EMPTY. Big gaping transparent holes of nothing.

Can someone explain this phoenomenon?

FYI: Here's the main method I'm referring to:

// In class GUI:

public static void main(String[] args) {
	init(); //static, 808, 635); //Console class is static, frame is static
	panel.paintLevel(); // static
	panel.paintLevel(); // static; // static

And when called externally, either this:

// In External Class:

	GUI.init();, 808, 635);

or this

// In External Class:

	GUI gui = new GUI();
	gui.init();, 808, 635);

does the transparent frame effect.

Let me know if you need more information.

I don't think we can provide any insight without seeing the panel and frame classes.

On a side note, your may want to reconsider your design in making everything static and trying to manage the interactions by calling static methods on the objects. The main method should really only be responsible for creating whatever minimal number of objects are needed to set up the environment of your program. All other operations should be performed by those objects themselves.

Try calling the main function of GUI from the external class's method...
This is what actually JVM does...

Is there any package involved?

Also post more code, we'd like to test it on our machines too.