alvalany -2 Junior Poster in Training

I was trying to create a gui based application in netbeans.
What I want is a lot of panels stacked one above the other.
So that when one of the option in a panel is selected, tthe related panel should be displayed above the original panel


I know this can be made possible using .setvisible(bool) but the layout messes up when i try to put them one above the other

I think my question is clear.

Please help with this