Is there an elegant way to replace a reference of an object which was added into a CardLayout with a new reference pointing to another object. I don't know if now I'm thinking well but I just want a feedback.
Instead of bankAccPanel direct adding add it to a container (bankAccPanel + anotherPanelNow). Then just swap cards in the subcontainer rather than main container.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.