posted 7 years ago
Basically, I have several .java JPanel forms and I want to invoke them through a custom menu bar I made on the main JFrame. I thought I had to invoke a new instance of them because I tried cardlayout method and it would not show the JPanels in the JFrame. I am not sure why. I want to ensure I maintain the menu bar at the top of the JFrame in each JPanel I invoke. How do I invoke them without creating a new instance. Here is some additional code from the main frame: