I use CardLayout with MVC and try to understand, when i should create the Panels used by the CardLayout.
For Example:
A DetailPanel to view and edit the Details of a DataItem is shown, when i select the DataItem on a ListPanel. Should i create and show DetailPanel when i select the DataItem, or should i create the DetailPanel at the start of my Application and just call a load method, when i select the DataItem, and then show the DetailPanel?
Currently i'm using CardLayout like a Stack. I add a Panel when i need it and remove it when i'm done editing.