I must have a lot of panels in my application.All main panels must be shown in same position.
When I click one button, reletad panel will be displayed with its components.
These panels also consist of panels,Jlabels,JButtons…….
To achieve this I have content panel in main frame.All other main panels will be added content panel according to clicked button.
I generated Java Panel by clicking New->Matisse->Panel(ResultBuilderPanel).Then I added my matisse components to panel.
Now My aim is to call this panel from JFrame when button is clicked.
I do not want to use Cardlayout.Because I do not prefer that there would be
so much code of lines in MAIN GUI
To do this I instantiate a global variable of ResultBuilderPanel in MainGuÄ±.
Then I placed this piece of code in Mouseclicked event