I am moderately experienced in Java, but inexperienced in making GUI's and even less experienced in applets. So, I have an applet that has a panel. I want to be able to have an actionListener in this panel swap panels in the applet. Here is some example code to illustrate what I need:
My solution after much thinking was to pass around an instance of the applet to all the panels, but I have no idea if this is good form or a terrible idea. So something like:
Is this good form or is there a better, more standard way of doing this. I've looked around, but almost all the examples I found were too simple.