yes and I did in my second post ask if there was a simpler way to do it
And I really don't think that there is. The simplest way to swap content in a Swing application is to use a CardLayout. The tutorial for this is quite good, and if you want to give it a go, then by all means try. If your attempt fails, then post it here with your question. If you feel that you even this attempt is too complex, then what I meant by my post above is that perhaps you will need to change what you want your program to do, to behave in a simpler fashion, not to code this swapping in a simpler way. Best of luck
Is there a classmate that attend the class you missed that might be able to provide you with notes? Or at least can give you a better general idea of what your teacher discussed?
Can't you contact the teacher? Most teacher's today do provide their e-mail addresses. (Or is this not a college class?)
If we at least had a good starting point to know what concepts or topics where discussed, we might be able to help better. If you have only been programming for two weeks, then I would agree that the CardLayout is a bit advanced for where you are likely at in your studies. At the same time, I cannot see a teacher discussing the topic that it sounds like you are describing in the second or third week of a course. And the topic/example you mentioned in your original post sounds like a classic example for discussing the CardLayout class. So we all may misunderstanding the problem/topic you are asking for guidance on.
What have you learned so far? That might also help us determine a starting point to help you.
With JButton there is one other way. Instead of swapping buttons, have one JButton and swap the Actions for it using setAction. The button will reflect the settings of the Action such as the name, icon, mnemonic, accelerator etc.