Control Structure Question
I'm really new to Java and the control structure is kinda confusing to me... I would just like some clarifications. I have a class that loads up a GUI (with the init() thing) and it has a button in it. I want the user to click the button and then the program executes a bunch of tasks and displays a new JPanel. How would I structure this? Am I going to need 2 classes? One for the initial start JPanel (the panel takes up the whole applet) and one for the secondary panel? I do already have an applet that initializes a gui (JPanel and JButton) and when the button is pressed, it closes the JPanel. I'm just not sure in what manner I should open a new one and execute commands. I usually code PHP and HTML, so this is very different for me... I also haven't done OOP before. In brief, it looks like:
initialize applet --> opens JPanel with button. (user clicks button) --> closes current JPanel, opens new JPanel, and executes commands.
If anyone knows what I'm talking about, please help... I am really having a hard time with Java so far...
Thanks in advance,