Alterar entre JPanels

Ola Pessoal,

Alguém poderia dar umas dicas ou quem sabe até exemplos
de como eu posso mudar os JPanels de um Frame.

Ja li sobre CardLayout …
mas não to entendendo como eu devo fazer, o que eu devo ter …

Estou tentando algo apenas pra teste, esta assim:

public class PanelPrincipal extends JPanel {

	JLabel label;

	public PanelPrincipal() {
		label = new JLabel("Panel Principal");
		this.add(label);
	}

}
public class PanelSecundario extends JPanel {
	JLabel label;

	public PanelSecundario() {
		label = new JLabel("Panel Secundario");
		this.add(label);

	}
}
public class FramePrincipal extends JFrame {

	private PanelPrincipal panelPrincipal;
	private PanelSecundario panelSecundario;
	private JButton button;

	public FramePrincipal() {

		panelPrincipal = new PanelPrincipal();
		this.getContentPane().add(panelPrincipal, BorderLayout.CENTER);

		button = new JButton("Mudar Panel");
		button.addActionListener(new AcaoMudarPanel());

		this.getContentPane().add(button, BorderLayout.SOUTH);

	}

	public void trocaPanel() {
		this.remove(panelPrincipal);
		this.repaint();

		panelSecundario = new PanelSecundario();
		this.getContentPane().add(panelSecundario, BorderLayout.CENTER);

		this.repaint();

	}

	class AcaoMudarPanel implements ActionListener {

		@Override
		public void actionPerformed(ActionEvent e) {
			trocaPanel();

		}

	}

}
public class TesteInterface {

	public static void main(String[] args) {

		FramePrincipal framePrincipal = new FramePrincipal();
		framePrincipal.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		framePrincipal.setSize(300, 300);
		framePrincipal.setVisible(true);

	}

}

Mas tambem não funciona …
Alguem sabe o que há de errado , ou se estou agindo certo desta forma?

Obrigado!

Puxa gente acho que consegui…

Veja como ficou:

package br.com.filipe.em.testeinterface;

import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class TesteInterface {

	private JPanel cards, panelBotoes;
	private PanelPrincipal panelPrincipal;
	private PanelSecundario panelSecundario;
	private JFrame frame;
	JButton b1, b2;

	public static void main(String[] args) {
		TesteInterface testeInterface = new TesteInterface();
		testeInterface.inicio();

	}

	private void inicio() {
		panelPrincipal = new PanelPrincipal();
		panelSecundario = new PanelSecundario();

		cards = new JPanel(new CardLayout());
		cards.add("Panel Um", panelPrincipal);
		cards.add("Panel Dois", panelSecundario);

		frame = new JFrame();
		frame.getContentPane().add(cards, BorderLayout.CENTER);

		b1 = new JButton("Panel 1");
		b2 = new JButton("Panel 2");

		panelBotoes = new JPanel();
		panelBotoes.add(b1);
		panelBotoes.add(b2);

		frame.getContentPane().add(panelBotoes, BorderLayout.SOUTH);

		b1.addActionListener(new MudarPanelUm());
		b2.addActionListener(new MudarPanelDois());

		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setSize(300, 300);
		frame.setVisible(true);

	}

	class MudarPanelUm implements ActionListener {

		@Override
		public void actionPerformed(ActionEvent e) {
			((CardLayout) cards.getLayout()).show(cards, "Panel Um");

		}

	}

	class MudarPanelDois implements ActionListener {

		@Override
		public void actionPerformed(ActionEvent e) {
			((CardLayout) cards.getLayout()).show(cards, "Panel Dois");

		}

	}
}

Bom deu certo assim por enquanto , se alguém tiver algo a acrescentar…
Qualquer ajuda é bem vinda.

Flw!