Hi guys, i have a question, is there any difference in performance when utilizing Show/hide() instead of setactiveitem(), when changing panels? Or is there any disadvantage using one of these rather than the other? Thanks in advance.
Assuming you are referring to CardLayout.setActiveItem, the main advantage is that it is easier to only have to call setActiveItem to specify what the new visible item is - you can disregard the old active item, and it will automatically hide it.
If you are manually calling hide(), show(), then there may be no need for a CardLayout at all. Note that CardLayout is used to implement TabPanel, and can be a useful way to build related widgets, where a user decision in one place affects which widget is visible in another.