Hey Team,
I hope you are all well! I have begun making progress on my game and decided it was time to work with GUI. First I will post my code and then I will state my question at the end:
Main Class
Main Frame class used both in menu and ingame
Start Menu Class
In Game Class
So here is my question!
When I load the game, the start menu loads fine, when I click the buttons for
test output it all works fine. But my core issue is, when I click new
IngameFrame(); to go to the IngameFrame method, it won't load my panels.
Now, I believe this is because I need to initialise the
IngameFrame class into the
MainFrame class like I did for the
TitleScreen class.
If this is the case, could you please aid me in figuring out how I should achieve this? I have attempted (I have commented it out in MainFrame class) in which obviously fails to load because I need something that will call the titlescreen and then place the IngameFrame on hold till it needs to be initialised.
I might be thinking of this in the wrong way, so any assistance would be amazing!! I am still new to
java so, please if it's not to much to ask provide examples with what you say, as I am still learning.
Thanks in advanced for all your assistance!
Mark.D