Thanks for the point Rob. In the CardLayout tutorial, I found the JTabbedPane, that I think its more suitable for my scenario.
But now I get a similar problem, for each exercise I put in the tabbedpane, I got a blank window under the main window.
In the image, I have put one exercise (tab 1, I don´t modified the title), and that is the blank window under I get:
¿Is the problem then in the classes constructor I put above?