Q:

Trying to break up CardLayout

I'm trying to break my code into smaller classes. I'm currently using CardLayout. The first class displays variables fine but the 2nd class isnt displaying anything. I am getting a blank page when I go to the second card. I'm sure the reason is because they are not separated into classes. Do I need to setup the CardLayout in a different class and have these two share?
First Class
public  test1()
{
    mainCL.setLayout(c1);
    main1.setPreferredSize(new Dimension(800, 900));
    mainCL.add(main1,"1");
    main1.setBackground(Color.BLUE);
    main1.setLayout(null);
    main2.setLayout(null);
    btnNewButton.setBounds(254, 835, 117, 29);
    main1.add(btnNewButton);

    JComboBox comboBox = new JComboBox();
    comboBox.setBounds(189, 130, 244, 27);

    main1.add(comboBox);
    mainCL.add(main1,"1");
    mainCL.add(main2,"2");
    c1.show(mainCL, "1");

    frame.setBounds(100, 100, 450, 300);
    frame.getContentPane().add(mainCL);
    frame.setVisible(true);
    frame.pack();
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

btnNewButton.addActionListener(new ActionListener() {
    public void actionPerformed( ActionEvent arg0) {
        c1.show(mainCL,"2");
    }
    });

}

public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable(){
        public void run() {
            new ttt();
        }
    });
}

2nd Class
public class test2 extends test1{

private final JButton btnNewButton1 = new JButton("drop");

test2(){

    JComboBox comboBox1 = new JComboBox();
    comboBox1.setBounds(189, 200, 244, 27);

    btnNewButton1.setBounds(254, 835, 117, 29);
    main2.add(comboBox1);
    main2.add(btnNewButton1);

}

EDIT
Sorry for the code before. I'm just testing this out so I didn't think about the naming conventions. Did some research and I think I might have solved my problem. Below is my updated code. Let me know if I have issues. Thanks!
First Class
public  test1()
{
private JLabel label;
JFrame frame;
JPanel panelCont;
JPanel panelOne;
JButton btnOne;
JComboBox signD = new JComboBox();
CardLayout cards;
test2 panelTwo;

public test1() {
    frame = new JFrame("CardLayout in two classes test");
    panelCont = new JPanel();
    panelOne = new JPanel();
    panelOne.setPreferredSize(new Dimension(600, 600));
    cards = new CardLayout();
    panelTwo = new test2(cards, panelCont);
    label = new JLabel("Page 1");
    btnOne = new JButton("Switch");
    panelCont.setLayout(cards);
    panelOne.setBackground(Color.BLUE);
    panelCont.add(panelOne, "1");

    //GridBag
    GridBagConstraints gbc_label = new GridBagConstraints();       
    GridBagLayout gbl_panelOne = new GridBagLayout();
    GridBagConstraints gbc_signD = new GridBagConstraints();
    GridBagConstraints gbc_buttonOne = new GridBagConstraints();

    //Panel
    gbl_panelOne.columnWidths = new int[]{100,400,100};
    gbl_panelOne.rowHeights = new int[]{100,400,100};
    panelOne.setLayout(gbl_panelOne);

    //Label
    label.setFont(new Font("Avenir", Font.PLAIN, 35));        
    gbc_label.gridx = 1;
    gbc_label.gridy = 0;
    panelOne.add(label, gbc_label);

    //Dropdown
    signD.setPreferredSize(new Dimension(200, 27));                                                                                 
    signD.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    signD.setModel(new DefaultComboBoxModel(new String[] {"Dropdown1", "Dropdown2"}));
    signD.setForeground(Color.DARK_GRAY);       
    gbc_signD.gridx = 1;
    gbc_signD.gridy = 1;
    panelOne.add(signD, gbc_signD);

    //Btn
    btnOne.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    btnOne.setHorizontalTextPosition(SwingConstants.CENTER);       
    gbc_buttonOne.gridy = 2;
    gbc_buttonOne.insets = new Insets(0, 0, 20, 5);
    gbc_buttonOne.anchor = GridBagConstraints.SOUTH;
    gbc_buttonOne.gridx = 1;
    panelOne.add(btnOne, gbc_buttonOne);

    //ActionListener
    btnOne.addActionListener(new ActionListener() {
       public void actionPerformed(ActionEvent e) {
       cards.show(panelCont, "2");
       }
    });
    panelCont.add(panelTwo, "2");
    cards.show(panelCont, "1");

    //Frame
    frame.getContentPane().add(panelCont);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setVisible(true);
}
}

2nd Class
public class test2 extends JPanel{

  JButton btnTwo;
CardLayout layout;
JPanel panelCont;
JLabel label = new JLabel("Page 2");
JComboBox signD2 = new JComboBox();

public test2(final CardLayout layout, JPanel panelCont) {
    this.layout = layout;
    this.panelCont = panelCont;
    GridBagLayout gridBagLayout2 = new GridBagLayout();
    gridBagLayout2.columnWidths = new int[]{100,400,100};
    gridBagLayout2.rowHeights = new int[]{100,400,100};
    setLayout(gridBagLayout2);
    setBackground(Color.RED);
    btnTwo = new JButton("Back");

    //GridBag
    GridBagConstraints gbc_label = new GridBagConstraints();       
    GridBagConstraints gbc_signD = new GridBagConstraints();
    GridBagConstraints gbc_buttonTwo = new GridBagConstraints();

    //Label
    label.setFont(new Font("Avenir", Font.PLAIN, 35));        
    gbc_label.gridx = 1;
    gbc_label.gridy = 0;
    add(label, gbc_label);

    //Dropdown
    signD2.setPreferredSize(new Dimension(200, 27));                                                                                
    signD2.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    signD2.setModel(new DefaultComboBoxModel(new String[] {"Dropdown3", "Dropdown4"}));
    signD2.setForeground(Color.DARK_GRAY);      
    gbc_signD.gridx = 1;
    gbc_signD.gridy = 1;
    add(signD2, gbc_signD);

    //btn
    btnTwo.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    btnTwo.setHorizontalTextPosition(SwingConstants.CENTER);       
    gbc_buttonTwo.gridy = 2;
    gbc_buttonTwo.insets = new Insets(0, 0, 20, 5);
    gbc_buttonTwo.anchor = GridBagConstraints.SOUTH;
    gbc_buttonTwo.gridx = 1;
    add(btnTwo, gbc_buttonTwo);

    btnTwo.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            layout.show(panelCont, "1");
        }
    });

}

}

MAIN
public class main {

public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            new test1();
        }
    });
}}

A:

I'm not sure what your goal is, what is driving you to ask this question, but assuming that you're trying to refactor code to allow you to create smaller and more manageable classes, this is not how you should be doing as you're misusing inheritance for one in a situation where composition would make much more sense. Instead I would suggest that you:

Create separate classes for the JPanel cards that are swapped in the cardlayout-using container
Create a separate class or classes to help control the swapping of the cards, a card-swapping "engine" if you will
Inherit with care and with good reason, mainly if you want to somehow alter the innate behavior of a class, such as the painting of a JPanel

Other problems with your code and your question:

No where do you create test1 or test2 instances, and instead seem to be creating an instance of a totally different class, ttt. This and your code's lack of declared variables, make it difficult for us to reproduce your problem to see what you might be doing wrong. For all we know, you may not be creating a test2 instance or using it.
You should avoid use of null layout and use of setBounds(...) for component placement as this makes for very inflexible GUI's that while they might look good on one platform look terrible on most other platforms or screen resolutions and that are very difficult to update and maintain.
As an aside, you will want to learn and use Java naming conventions. Variable names should all begin with a lower letter while class names with an upper case letter. Learning this and following this will allow us to better understand your code, and would allow you to better understand the code of others.

For example please see the code below. Note that it has been written so that it all can be copied and pasted directly into the IDE since only one class, CardExample, the one with the main method, is public and has all the imports:
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridBagLayout;
import java.awt.Paint;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.List;
import javax.swing.*;

public class CardExample {
    private static void createAndShowGui() {
        CardExampleMain cardUser = new CardExampleMain();

        JFrame frame = new JFrame("Card Example");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.getContentPane().add(cardUser.getMainPanel());
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    }

    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> createAndShowGui());
    }
}

class CardExampleMain {
    private JPanel mainPanel = new JPanel();
    private CardUser cardUser = new CardUser();
    private Card1 card1 = new Card1(cardUser);
    private Card2 card2 = new Card2(cardUser);
    private Card3 card3 = new Card3(cardUser);
    private JComboBox<String> cardKeyBox;

    public CardExampleMain() {
        cardUser.addCard(card1, card1.getName());
        cardUser.addCard(card2, card2.getName());
        cardUser.addCard(card3, card3.getName());

        int itemsSize = cardUser.getKeys().size();
        String[] items = cardUser.getKeys().toArray(new String[itemsSize]);
        cardKeyBox = new JComboBox<>(items);
        cardKeyBox.setSelectedIndex(-1);
        cardKeyBox.addActionListener(e -> cardUser.show(cardKeyBox.getSelectedItem().toString()));

        JPanel topPanel = new JPanel();
        topPanel.setBorder(BorderFactory.createEtchedBorder());
        topPanel.add(new JLabel("Select Card:"));
        topPanel.add(cardKeyBox);

        mainPanel.setLayout(new BorderLayout());
        mainPanel.add(cardUser.getMainPanel());
        mainPanel.add(topPanel, BorderLayout.PAGE_START);
    }

    public JPanel getMainPanel() {
        return mainPanel;
    }

}

class CardUser {
    private CardLayout cardLayout = new CardLayout();
    private JPanel mainPanel = new JPanel(cardLayout);
    private List<String> keys = new ArrayList<>();

    public JPanel getMainPanel() {
        return mainPanel;
    }

    public void addCard(Component component, String key) {
        mainPanel.add(component, key);
        keys.add(key);
    }

    public void show(String key) {
        cardLayout.show(mainPanel, key);
    }

    public void next() {
        cardLayout.next(mainPanel);
    }

    public void previous() {
        cardLayout.previous(mainPanel);
    }

    public List<String> getKeys() {
        return keys;
    }
}

@SuppressWarnings("serial")
abstract class CardPanel extends JPanel {
    private static final int EB_GAP = 5;
    protected CardUser cardUser;
    protected Action nextAction;
    protected Action previousAction;
    protected Action showAction;

    public CardPanel(CardUser cardUser) {
        this.cardUser = cardUser;

        nextAction = new CardAction("Next", KeyEvent.VK_N, e -> cardUser.next());
        previousAction = new CardAction("Previous", KeyEvent.VK_P, e -> cardUser.previous());

        setBorder(BorderFactory.createEmptyBorder(EB_GAP, EB_GAP, EB_GAP, EB_GAP));
        setLayout(new BorderLayout());

        JPanel buttonPanel = new JPanel();
        buttonPanel.setOpaque(false);
        buttonPanel.add(new JButton(previousAction));
        buttonPanel.add(new JButton(nextAction));

        add(buttonPanel, BorderLayout.PAGE_END);

    }
}

@SuppressWarnings("serial")
class CardAction extends AbstractAction {
    private ActionListener listener;

    public CardAction(String name, int mnemonic, ActionListener listener) {
        super(name);
        putValue(MNEMONIC_KEY, mnemonic);
        this.listener = listener;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        listener.actionPerformed(e);
    }
}

@SuppressWarnings("serial")
class Card1 extends CardPanel {
    public static final String NAME = "Card 1";
    private static final Color COLOR_1 = Color.PINK;
    private static final Color COLOR_2 = new Color(150, 150, 255);
    private static final float WDTH = 20f;
    private static final int LBL_GAP = 40;

    public Card1(CardUser cardUser) {
        super(cardUser);
        setName(NAME);
        JLabel label = new JLabel(NAME);
        label.setFont(label.getFont().deriveFont(Font.BOLD, 128));
        label.setBorder(BorderFactory.createEmptyBorder(LBL_GAP, LBL_GAP, LBL_GAP, LBL_GAP));

        add(label);
    }

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2 = (Graphics2D) g;
        Paint paint = new GradientPaint(0f, 0f, COLOR_1, WDTH, WDTH, COLOR_2, true);
        g2.setPaint(paint);
        g2.fillRect(0, 0, getWidth(), getHeight());
    }
}

@SuppressWarnings("serial")
class Card2 extends CardPanel {
    public static final String NAME = "Card 2";
    private static final Color COLOR_1 = Color.BLACK;
    private static final Color COLOR_2 = Color.BLUE;
    private static final Color LABEL_FG = Color.LIGHT_GRAY;
    private static final String[] DATA = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"};
    private JLabel label = new JLabel("Card 2", SwingConstants.CENTER);
    private JComboBox<String> comboBox = new JComboBox<>(DATA);

    public Card2(CardUser cardUser) {
        super(cardUser);
        setName(NAME);
        label.setForeground(LABEL_FG);

        JPanel centralPanel = new JPanel(new GridBagLayout());
        centralPanel.setOpaque(false);
        centralPanel.add(comboBox);

        add(label, BorderLayout.PAGE_START);
        add(centralPanel);
    }

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2 = (Graphics2D) g;
        Paint paint = new GradientPaint(0f, 0f, COLOR_1, getWidth(), getHeight(), COLOR_2, false);
        g2.setPaint(paint);
        g2.fillRect(0, 0, getWidth(), getHeight());
    }    
}

@SuppressWarnings("serial")
class Card3 extends CardPanel {
    public static final String NAME = "Card 3";

    public Card3(CardUser cardUser) {
        super(cardUser);
        setName(NAME);
        add(new JLabel(NAME, SwingConstants.CENTER));
        // TODO put more components in here
    }

}

