Hi. In my program, i have a panel inside an applet.
There are several panels i'd like to load according to the pressed button. These panels will be loaded at the center of the applet.
When i press a button i'd like the previous panel to be closed and the new one opened.
A panel is loaded at first inside init();
Then i'd like to press a button and replace this panel with another one. How can i do this? It's like i need to remove the old panel using remove() then do add for the new one and repaint. But this is not working.
I tried many approches but they didn't work...
Anyone knows how to do this.
Thanks alot for the help!