So, I have several JPanels that contain buttons, labels, etc. that I want to switch between from a main JFrame. Currently I am trying to use the this.add(JPanelname); method and this.remove(JPanelname); with the validate(); and repaint(); methods
The problem is it will add the panel to the JFrame but it will not remove it. I am not sure how exactly to go about this and any help would be greatly appreciated.