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 GUI.java 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
Console.run(frame, 808, 635); //Console class is static, frame is static
panel.paintLevel(); // static
panel.paintLevel(); // static
frame.run(); // static
}
And when called externally, either this:
// In External Class:
GUI.init();
Console.run(GUI.frame, 808, 635);
GUI.panel.paintLevel();
GUI.panel.paintLevel();
GUI.frame.run();
or this
// In External Class:
GUI gui = new GUI();
gui.init();
Console.run(gui.frame, 808, 635);
gui.panel.paintLevel();
gui.panel.paintLevel();
gui.frame.run();
does the transparent frame effect.
Let me know if you need more information.