Atualizar JPanel com clique em JButton

Tenho uma classe que gera uma das abas de um JTabbedPane.

Essa aba deve ser composta de 5 botões (JButton) e um JPanel. Preciso que esse JPanel seja atualizado de acordo com o botão clicado.

Na classe abaixo eu criei os botões e consegui alterar o fundo do JPanel de acordo com o botão:

package br.com.progold.core;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;

public class AbaConf extends JPanel {

	private JPanel buttonPanel;
	private JButton cfopButton;
	private JButton msgButton;
	private JButton taxaButton;
	private JButton icmsButton;
	private JButton certButton;
	private JPanel mainPanel;
	
	private static final long serialVersionUID = 1L;
	
	public AbaConf(){
		super();
		setLayout(null);
		adicionarComponentes();
		
	}

	private void adicionarComponentes() {
		buttonPanel = new JPanel(new GridLayout(1, 5));
		buttonPanel.setBounds(0, 0, 1010, 30);
		cfopButton = new JButton("CFOP");
		cfopButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				mainPanel.setBackground(new Color(255, 255, 0));
				mainPanel.repaint();
			}
		});
		msgButton = new JButton("MENSAGEM");
		msgButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				mainPanel.setBackground(new Color(0, 255, 255));
				mainPanel.repaint();
			}
		});
		taxaButton = new JButton("TAXAS");
		taxaButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				mainPanel.setBackground(new Color(0, 255, 0));
				mainPanel.repaint();
			}
		});
		icmsButton = new JButton("ICMS");
		icmsButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				mainPanel.setBackground(new Color(0, 0, 255));
				mainPanel.repaint();
			}
		});
		certButton = new JButton("CERTIFICADOS");
		certButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				mainPanel.setBackground(new Color(255, 0, 255));
				mainPanel.repaint();
			}
		});
		buttonPanel.add(cfopButton);
		buttonPanel.add(msgButton);
		buttonPanel.add(taxaButton);
		buttonPanel.add(icmsButton);
		buttonPanel.add(certButton);
		this.add(buttonPanel);
		
		mainPanel = new JPanel();
		mainPanel.setBackground(new Color(255,0,0));
		mainPanel.setBounds(0, 31, 1010, 680);
		
		this.add(mainPanel);
		
	}

}

Como funcionou até aqui, criei 5 novas classes (todas extendendo o JPanel), dentro delas só coloquei um JLabel com o texto de cada botão (só pra teste) e alterei o ActionListener dos botões para isso:

cfopButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				mainPanel = new PanelCfop();
				mainPanel.repaint();
			}
		});

Mas dessa forma não acontece nada. Também tentei criar um novo JPanel e adiciona-lo ao mainPanel, mas tb não funcionou.

Alguém sabe como resolvo isso?

Adicionei mais um JPanel na primeira classe e coloquei ele pra receber a nova tela:

package br.com.progold.core;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;

public class AbaConf extends JPanel {

	private JPanel buttonPanel;
	private JButton cfopButton;
	private JButton msgButton;
	private JButton taxaButton;
	private JButton icmsButton;
	private JButton certButton;
	private JPanel mainPanel;
	private JPanel contentPanel;
	
	private static final long serialVersionUID = 1L;
	
	public AbaConf(){
		super();
		setLayout(null);
		adicionarComponentes();
		
	}

	private void adicionarComponentes() {
		buttonPanel = new JPanel(new GridLayout(1, 5));
		buttonPanel.setBounds(0, 0, 1010, 30);
		cfopButton = new JButton("CFOP");
		cfopButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				mainPanel.remove(contentPanel);
				contentPanel = new PanelCfop();
				mainPanel.add(contentPanel);
				mainPanel.repaint();
			}
		});
		msgButton = new JButton("MENSAGEM");
		msgButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				mainPanel.remove(contentPanel);
				contentPanel = new PanelMsg();
				mainPanel.add(contentPanel);
				mainPanel.repaint();
			}
		});
		taxaButton = new JButton("TAXAS");
		taxaButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				mainPanel.remove(contentPanel);
				contentPanel = new PanelTaxas();
				mainPanel.add(contentPanel);
				mainPanel.repaint();
			}
		});
		icmsButton = new JButton("ICMS");
		icmsButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				mainPanel.remove(contentPanel);
				contentPanel = new PanelIcms();
				mainPanel.add(contentPanel);
				mainPanel.repaint();
			}
		});
		certButton = new JButton("CERTIFICADOS");
		certButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				mainPanel.remove(contentPanel);
				contentPanel = new PanelCert();
				mainPanel.add(contentPanel);
				mainPanel.repaint();
			}
		});
		buttonPanel.add(cfopButton);
		buttonPanel.add(msgButton);
		buttonPanel.add(taxaButton);
		buttonPanel.add(icmsButton);
		buttonPanel.add(certButton);
		this.add(buttonPanel);
		
		mainPanel = new JPanel(new GridLayout(1, 1));
		mainPanel.setBounds(0, 31, 1010, 680);
		
		contentPanel = new JPanel();
		contentPanel.setBounds(0,0,1010,680);
		contentPanel.setBackground(new Color(255,0,0));
		
		mainPanel.add(contentPanel);
		
		
		this.add(mainPanel);
		
	}

}

Dessa forma funcionou, conforme eu clico o ‘contentPanel’ muda e é carregado, mas por algum motivo, o texto do JLabel (que é criado no construtor de cada classe Panel) só aparece qd clico em cima do contentPanel. Ele é carregado (o fundo muda), mas o texto não aparece até eu clicar no Panel.

Segue a classe PanelCfop (nas outras só muda o texto e fundo):

package br.com.progold.core;

import java.awt.Color;

import javax.swing.*;

public class PanelCfop extends JPanel {

	private static final long serialVersionUID = 1L;
	private JLabel label;
	
	public PanelCfop(){
		super();
		this.setBounds(0,0,1010,680);
		this.setBackground(new Color(255, 255, 0));
		
		label = new JLabel("Tela do CFOP");
		this.add(label);
	}

}