简体   繁体   中英

CardLayout - replace panel

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM