I have this main window that extends a JFrame which flips a lot of different JPanel's, so I thought the CardLayout would be useful for this kind of behavior.
I've added two panes in the CardLayout, one pane is way bigger than the other, when I added both panes, the first one which is smaller was shown, while the second which is bigger wasn't(Good behavior), but it left a huge space below of the first pane.
I don't know how the size works on the CardLayout, but It doesn't respond to pack(), looks like it uses a specific algorithm to figure out the preferred size for the layout.
Anyone got an idea?