I have a JApplet with a CardLayout JPanel with each card accessed through a leaf in a JTree or a 'Next' button. Each card displays fine until there are more than 22, when components (JTextFields)from the next card apear ontop of the last card. The last node is selected in the JTree but on using the next button, the card after the problem card is displayed perfectly. If the problem card is selected again, then it displays fine too. I'm using show() for the card.
I've rewritten it using a JFrame instead of JApplet and there is no problem.