Hi,
I'm relatively new to
Java and I am attempting to create a program which includes three panels. The first panel has three buttons, two of which lead to the other two panels and the third is an exit button.
I managed to figure out how to create the exit button using something like:
I was hoping I would be able to use something similar to this structure, but instead of 'System.exit(0);', maybe I could have something that would prompt the next panel to open and shut the previous one? I have tried searching online for a long time and cannot find anything appropriate that works, so I would really appreciate some help please!
The other suggestion I have come across is to do with booleans and setting the panels to visible or not, but having not yet properly studied this, I'm struggling with how to write it and just keep on getting errors, so if anyone thinks that may be a good method, could they please explain how exactly I would go about writing it please?
I hope I have explained myself well enough - sorry, but I am new to Java and so this may seem really basic and obvious, but it would be great if anyone would be kind enough to help me through it!